Fórum

RE: LiferayFacesContext.getPortlet() method returning null

Hasika Pamunuwa, modificado 11 Anos atrás.

LiferayFacesContext.getPortlet() method returning null

New Member Postagens: 11 Data de Entrada: 21/06/10 Postagens Recentes
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


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


But following worked...


LiferayFacesContext liferayFacesContext = LiferayFacesContext.getInstance();
PortletRequestImpl portletRequest = (PortletRequestImpl) liferayFacesContext.getExternalContext().getRequest();
Portlet portlet = portletRequest.getPortlet();
thumbnail
Neil Griffin, modificado 11 Anos atrás.

RE: LiferayFacesContext.getPortlet() method returning null

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Fixed in FACES-1212. emoticon