Portlet API type | Configuration object | Value binding |
---|---|---|
JSR 168 API | PortletPreferences | #{portletPreferences.attribute name} |
IBM® portlet API | PortletApplicationSettings | #{portletApplicationSettings.attribute name} |
PortletSettings | #{portletSettings.attribute name} | |
PortletData | #{portletData.attribute name} |
Use the Page Data view of a portlet JSP file to define attributes and bind them to Faces components, as described in Accessing portlet API objects from JSP files.
PortletRequest request = (PortletRequest)facesContext.getExternalContext().getRequest(); PortletResponse response = (PortletResponse)facesContext.getExternalContext().getResponse(); PortletContext context = (PortletContext)facesContext.getExternalContext().getContext();
If you want to access the ActionEvent class in the IBM portlet API (org.apache.jetspeed.portlet.event.ActionEvent) for a Faces action, it can be obtained through a request attribute:
ActionEvent event = (ActionEvent)facesContext.getExternalContext().getRequestMap().get("com.ibm.faces.portlet.ACTION_EVENT");