Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Using Service Trackers on a JSF portlet
From a non-bean class lying on a JSF portlet, I'm trying to invoke a service defined in a Service Builder-created module. What I've read on the official documentation (Liferay 7.2) is that this task can be accomplished by using Service Trackers.
The thing is that on a Liferay 7.4 Service Builder generated module, the '_serviceTracker' property has not been created within the [Foo]LocalServiceUtil service class, once the 'build service' gradle task has finished. As a consecuence, when from a non-bean class, which defines a [Foo]LocalServiceTracker class, lying on a JSF portlet, I call the method '.getService()', it is always returning a 'null' value.
All I've read about invoking Service Builder based services is intended for the Liferay 7.2 release, but I'm developing with Liferay 7.4. My doubt is whether the info described on Liferay 7.2 docs is valid for Liferay 7.4 or, I'm just doing the things the wrong way.
I'd really appreciate some clarification.
Thanks.
Powered by Liferay™