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
RE: How to use own service in webcontent?
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.
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)
/>
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)
/>
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™