Developing Portlets

compared with
Current by Judy Guglielmin
on Apr 18, 2018 13:05.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 2 changes. View first change.

 h3. Developing Your Own Portlets
  
 {anchor:portletXML}
  
 h4. portlet.xml
  
 ICEfaces makes use of the PortletFaces Bridge to handle the mapping of the portlet lifecycle onto the JSF lifecycle. This has many advantages like enabling proper resource handling and cleaner integration with the portal container. To define your portlet, specify the following:
 {code:xml} <portlet>
  <portlet-name>chat-ice-portlet</portlet-name>
  <display-name>Chat</display-name>
  <portlet-class>
  javax.portlet.faces.GenericFacesPortlet
  </portlet-class>
  <init-param>
  <name>javax.portlet.faces.defaultViewId.view</name>
  <value>/chat.xhtml</value>
  </init-param>
  <supports>
  <mime-type>text/html</mime-type>
  <portlet-mode>view</portlet-mode>
  </supports>
  <portlet-info>
  <title>ICEfaces Portlet Chat</title>
  <short-title>Chat</short-title>
  <keywords>icefaces portlet chat icepush</keywords>
  </portlet-info>
  </portlet>
 {code}
  
 If you are using the PortletFaces Bridge, the *portlet-class* needs to be defined as:
  If you are using the older/deprecated PortletFaces Bridge, the *portlet-class* needs to be defined as:
  
 {code:xml}
  <portlet-class>
  org.portletfaces.bridge.GenericFacesPortlet
  </portlet-class>
 {code}
  
 The LiferayFaces Bridge is backwards compatible in this regard so if you are migrating from PortletFaces to LiferayFaces, the older classname will still work.
  The LiferayFaces Bridge is no longer backwards compatible (3.3.0_P05 release) in this regard so if you are migrating from PortletFaces to LiferayFaces, the older classname will no longer work.
  
 h4. web.xml
  
 To prevent the processing of portlet resource URLs to avoid caching of things like bridge.js, the following parameter should be set to false.
  
 {code:xml}<context-param>
  <param-name>org.icefaces.uniqueResourceURLs</param-name>
  <param-value>false</param-value>
 </context-param>{code}
  
 {anchor:portletLibDep}
  
 h4. Library Dependencies
  
 You must use a portlet bridge to run JSF and ICEfaces portlets in a portal container. See the section on [Portlet Bridges] for more information.

© Copyright 2021 ICEsoft Technologies Canada Corp.