Liferay ist zum sechsten Mal in Folge ein Leader im Gartner Magic Quadrant. Hier mehr erfahren

Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
Guru k
How to Pass variable from Hook to Custom Portlet
16. April 2012 04:20
Antwort

Guru k

Rang: Junior Member

Nachrichten: 64

Eintrittsdatum: 7. Februar 2012

Neue Beiträge

Hi,

I am trying to pass the variable from JSP of Document and Media Hook to JSP of my Custom portlet.

I tried passing value through session like,

1PortletSession session = renderRequest.getPortletSession();
2session.setAttribute("sessionValue", portletId , PortletSession.APPLICATION_SCOPE);


1PortletSession portletSession = renderRequest.getPortletSession();
2String tabNames = (String)portletSession.getAttribute("sessionValue",PortletSession.APPLICATION_SCOPE);


but i get the value as null. Please advice where am i going wrong.

Thanks
Guru
Guru k
RE: How to Pass variable from Hook to Custom Portlet
16. April 2012 23:11
Antwort

Guru k

Rang: Junior Member

Nachrichten: 64

Eintrittsdatum: 7. Februar 2012

Neue Beiträge

Got it working with the solution in the below thread,

http://www.liferay.com/community/forums/-/message_boards/message/11883956