< 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 versionif ( (getPortletConfig().getContext().getMajorVersion() <= 1) && (getPortletConfig().getContext().getMinorVersion() <= 1) ) { // simple actions not supported } else { // simmple actions supported } |
< Day Day Up > |