RE: How to use own service in webcontent?

Dev Liferay, modified 6 Years ago. New Member Posts: 6 Join Date: 6/24/19 Recent Posts
Hi Liferay community,Util Locator cannot find my own service which is defined as a bundle, how to solve it? Thank you for help in advance.
thumbnail
Christoph Rabel, modified 6 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
You need to enable the servicelocator in the system settings. (Just delete the line in the config). I believe, you will find the whole presentation helpful.
https://devcon.dccs.at/de/web/guest/enable-servicelocator-details
Then you can access your service:
<#assign
  menuhelper = serviceLocator.findService("at.dccs.liferay.menu.MenuSearchLocalService")
  menulist = menuhelper.getMenuOfTheWeek(themeDisplay, "GLOBAL.STRUCTURE.DISH", "MenuDay", 0)
/>