liferayjsr286gatein

Portlet navigation


We are evaluating using JSR-286 portlets for our next project. Users will be able to build an web app with our hosted service. Each user will get a webiste on our portlet server. One of our scenarios is:

Is there some way to get the urls of the "detail portlet"s in the "table portlet". Something like List<URL> PortletUtil.getPortletURLs(String portletType)?

We don't want the user has to configure a target URL in the "table portlet", to avoid broken links if the detail page URL is changed.

We have not decided yet which portlet server to use (if at all), so server specific solutions are ok.


Solution

  • The portlet specification says nothing about pages. From a JSR-286 standpoint, the answer to your question is "No".

    You also tag Liferay and GateIn, which have proprietary APIs. Without going into detail, in Liferay you'd look for the "layout" (which is the API name for a page) within a site (API name: group). You'll use LayoutService or LayoutLocalService for this task. Depending on your usecase it might be eating into your performance to constantly look up pages, so you might want to cache results (but measure first if it indeed is a relevant performance hit). If you don't want to configure the page explicitly, you also need to decide how to react if different pages contain the same detail portlet.

    On GateIn's API, I can't give any hints.