Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Hasika Pamunuwa
LiferayFacesContext.getPortlet() method returning null
8. Mai 2012 17:22
Antwort

Hasika Pamunuwa

Rang: New Member

Nachrichten: 11

Eintrittsdatum: 21. Juni 2010

Neue Beiträge

Following returns null when called from an action event method which is invoked by primefaces 3.2 command button. I'm using liferay-faces-portal-3.1.0-BETA2.jar and Liferay 6.1

1
2LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
3Portlet portlet = liferayFacesContext.getPortlet();   // portlet is coming back as null


But following worked...

1
2LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
3PortletRequestImpl portletRequest = (PortletRequestImpl) liferayFacesContext.getExternalContext().getRequest();
4Portlet portlet = portletRequest.getPortlet();
Neil Griffin
RE: LiferayFacesContext.getPortlet() method returning null
9. Mai 2012 08:59
Antwort

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 2062

Eintrittsdatum: 26. Juli 2005

Neue Beiträge

Fixed in FACES-1212. emoticon