Foren
Link in activityInterpreter
qingsheng fu, geändert vor 13 Jahren.
Link in activityInterpreter
New Member Beiträge: 11 Beitrittsdatum: 25.03.11 Neueste Beiträge
How to create a link in custom activity interpreter? I tried the similar way like that Blogs uses:
String link =themeDisplay.getPortalURL() + themeDisplay.getPathMain() +
"/my_portlet/find_entry?entryId=" + activity.getClassPK();
I defined friendlyURL route in XML file as /{entryId:\d+}
but the link does not work for my portlets(non-instansable)--not going to the jsp page. the portlet were placed on a user page and on a page in a community where the user is a memember.
thanks for your help!
String link =themeDisplay.getPortalURL() + themeDisplay.getPathMain() +
"/my_portlet/find_entry?entryId=" + activity.getClassPK();
I defined friendlyURL route in XML file as /{entryId:\d+}
but the link does not work for my portlets(non-instansable)--not going to the jsp page. the portlet were placed on a user page and on a page in a community where the user is a memember.
thanks for your help!
qingsheng fu, geändert vor 13 Jahren.
RE: Link in activityInterpreter
New Member Beiträge: 11 Beitrittsdatum: 25.03.11 Neueste Beiträge
I got this figured out. core portlets like blogs, messagebords have kind of maping in struts-config.xlm that maps links to action classes.
in my case, my portlet was derived from liferay MVC portlet. so to create a link, first need a layoutURL by using PortalUtil.getFullLayoutURL(groupid,portletname), then append to it the pattern that was specified in friendly url xml. hope this helpful to beginners.
in my case, my portlet was derived from liferay MVC portlet. so to create a link, first need a layoutURL by using PortalUtil.getFullLayoutURL(groupid,portletname), then append to it the pattern that was specified in friendly url xml. hope this helpful to beginners.