留言板
PortletURL from PortletLocalServiceUtil
Hi
Is a any possibility to get portlet URL from PortletLocalServiceUtil.
I use
List<Portlet> portletList = PortletLocalServiceUtil.getPortlets(); // as list
or
Portlet portlet PortletLocalServiceUtil.getPortlet(Long Id);
I have to get portletURL dynamicly from another portlet, then redirect to this portlet.
Thanks
Is a any possibility to get portlet URL from PortletLocalServiceUtil.
I use
List<Portlet> portletList = PortletLocalServiceUtil.getPortlets(); // as list
or
Portlet portlet PortletLocalServiceUtil.getPortlet(Long Id);
I have to get portletURL dynamicly from another portlet, then redirect to this portlet.
Thanks
jelmer kuperus,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
Liferay Legend 帖子: 1191 加入日期: 10-3-10 最近的帖子long plid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), portlet.getPortletId());
PortletURL viewURL = new PortletURLImpl(request, portlet.getPortletId(), plid , PortletRequest.RENDER_PHASE);
This will redirect you to the first page that has this portlet on it
Lukas Ryfa,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
New Member 帖子: 3 加入日期: 11-7-7 最近的帖子
i forgot to say that i use Vaadin portlets and i don't have access to objects:
themeDisplay.getScopeGroupId()
request
themeDisplay.getScopeGroupId()
request
jelmer kuperus,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
Liferay Legend 帖子: 1191 加入日期: 10-3-10 最近的帖子
Maybe this helps
http://www.emforge.net/web/akakunin-experiments/sources?p_p_id=scmportlet_WAR_emforgeportlet&p_p_lifecycle=0&p_p_state=normal&_scmportlet_WAR_emforgeportlet_path=sample-vaadin-portlet%2Fdocroot%2FWEB-INF%2Fsrc%2Fsample%2Fvaadin%2FSampleApplication.java&_scmportlet_WAR_emforgeportlet_version=
http://www.emforge.net/web/akakunin-experiments/sources?p_p_id=scmportlet_WAR_emforgeportlet&p_p_lifecycle=0&p_p_state=normal&_scmportlet_WAR_emforgeportlet_path=sample-vaadin-portlet%2Fdocroot%2FWEB-INF%2Fsrc%2Fsample%2Fvaadin%2FSampleApplication.java&_scmportlet_WAR_emforgeportlet_version=
Lukas Ryfa,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
New Member 帖子: 3 加入日期: 11-7-7 最近的帖子
Ok thanks
But i have to prepare portletURL beyond handleRenderRequest() method.
In other method whitch i use to event handling, and i don't have this objects.
Maybe after every handleRenderRequest save objects ThemeDisplay and RenderRequest as as local variables in portlets class and then use them in other methods?
But if these objects will be correct ?
unfortunately this.currentRenderRequest.getAttribute(WebKeys.THEME_DISPLAY); -> is null ;(
But i have to prepare portletURL beyond handleRenderRequest() method.
In other method whitch i use to event handling, and i don't have this objects.
Maybe after every handleRenderRequest save objects ThemeDisplay and RenderRequest as as local variables in portlets class and then use them in other methods?
But if these objects will be correct ?
unfortunately this.currentRenderRequest.getAttribute(WebKeys.THEME_DISPLAY); -> is null ;(
Jitendra Rajput,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
Hi Jelmer ,
By using your way we can not retrieve URL of portlet which reside on another group/community .
here you have passed scope group id of current group / current community.
so is that any way by which i can retrieve porltet URL even if it reside any where like in diff community/organization ?
By using your way we can not retrieve URL of portlet which reside on another group/community .
here you have passed scope group id of current group / current community.
so is that any way by which i can retrieve porltet URL even if it reside any where like in diff community/organization ?
neelam bhandari,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
Regular Member 帖子: 102 加入日期: 11-8-16 最近的帖子
Hi ,
Have you found out the solution for your query?I am facing the same issue.
Thanks
Neelam
Have you found out the solution for your query?I am facing the same issue.
Thanks
Neelam
Jitendra Rajput,修改在12 年前。
RE: PortletURL from PortletLocalServiceUtil
Liferay Master 帖子: 875 加入日期: 11-1-7 最近的帖子
you need to hard code your group id ...i mean read it from property file ..you can not make it as completely dynamic..