Csaba Meszaros 7 Years Ago This works for services fine (e.g. if we have API), but what about the modules which are dedicated to be ResourceLoader holders? I have a module which contains the class which implements ResourceBundleLoader, and a Language.properties file. Let this module be named as com.example.registration.resource. How would you add it as a dependency to the fragment using it? Please sign in to reply. Reply as... Cancel
Rocco Germinario 7 Years Ago Interesting technique for injecting reference to services.But it's not really about dependencies: I tried to simply use MemberRequestLocalServiceUtil and it just works... Please sign in to reply. Reply as... Cancel David H Nebinger Rocco Germinario 7 Years Ago The Util classes are effectively deprecated when using OSGi. You'll hear over and over again that if you're doing OSGi, you should do OSGi and avoid the static Util classes. Please sign in to reply. Reply as... Cancel
David H Nebinger Rocco Germinario 7 Years Ago The Util classes are effectively deprecated when using OSGi. You'll hear over and over again that if you're doing OSGi, you should do OSGi and avoid the static Util classes. Please sign in to reply. Reply as... Cancel
Rafik H 6 Years Ago Yes, Outside using the Util class for Services. Other components are only accessible using OSGi service registry. one practical example is using Item Selector in your fragment. Please sign in to reply. Reply as... Cancel David H Nebinger Rafik H 6 Years Ago You shouldn't even use the Util classes for services.If you're doing OSGi, then do OSGi. Please sign in to reply. Reply as... Cancel
David H Nebinger Rafik H 6 Years Ago You shouldn't even use the Util classes for services.If you're doing OSGi, then do OSGi. Please sign in to reply. Reply as... Cancel
Andy Wu 6 Years Ago good idea for using service in jsp fragment Please sign in to reply. Reply as... Cancel
Ahmed Hasnaoui 4 Years Ago hi all, is this still valid for 7.1? Please sign in to reply. Reply as... Cancel David H Nebinger Ahmed Hasnaoui 4 Years Ago Yes, as well as for 7.2. Please sign in to reply. Reply as... Cancel Javi Torres David H Nebinger 4 Years Ago - Edited Hi David, thanks for the blog post. I'm trying to use this approach, and it works fine with my custom service, but only if the service does not have any custom finder defined. Otherwise, the service object I'm pushing as a request attribute is null. Do you know if there is a workaround for this? Thanks! Please sign in to reply. Reply as... Cancel
David H Nebinger Ahmed Hasnaoui 4 Years Ago Yes, as well as for 7.2. Please sign in to reply. Reply as... Cancel Javi Torres David H Nebinger 4 Years Ago - Edited Hi David, thanks for the blog post. I'm trying to use this approach, and it works fine with my custom service, but only if the service does not have any custom finder defined. Otherwise, the service object I'm pushing as a request attribute is null. Do you know if there is a workaround for this? Thanks! Please sign in to reply. Reply as... Cancel
Javi Torres David H Nebinger 4 Years Ago - Edited Hi David, thanks for the blog post. I'm trying to use this approach, and it works fine with my custom service, but only if the service does not have any custom finder defined. Otherwise, the service object I'm pushing as a request attribute is null. Do you know if there is a workaround for this? Thanks! Please sign in to reply. Reply as... Cancel