5.3 Simple action String support

 <  Day Day Up  >  

Simple portlet actions are not available in the Portlet API prior to V4.2. To check if a simple action String is supported, you can use getMajorVersion() and getMinorVersion() methods of the PortletContext, which return, respectively, the major and minor version of the Portlet API that the portlet container supports. The sample code is shown in Example 5-6.

Example 5-6. Check PortletAPI version
 if ( (getPortletConfig().getContext().getMajorVersion() <= 1) &&       (getPortletConfig().getContext().getMinorVersion() <= 1) ) {    // simple actions not supported } else {    // simmple actions supported } 
 <  Day Day Up  >  


IBM WebSphere Portal V5 A Guide for Portlet Application Development
IBM Websphere Portal V5: A Guide for Portlet Application Development
ISBN: 0738498513
EAN: 2147483647
Year: 2004
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net