Restrictions on Struts XDIME portlets

One instance of a Struts XDIME portlet can be displayed on a page. As a result, you cannot display multiple Struts XDIME portlets in "normal mode" on a page. However, you can add multiple Struts XDIME portlets to a page in those cases where the portlet's content is displayed only by clicking the portlet's title in the list of navigation links for the page.

The reason for this restriction is a namespace issue. In generic Struts portlets, the form name field needs to be encoded, using the encodeNamespace api, to ensure uniqueness if multiple instances of the portlet are added to the page. However, in the XDIME markup, the form name must match the form name attribute of the layout that the canvas is associated with. Therefore the encodeNamespace method can not be used on the form name.

Also it should be a recommended practice that the form name in the layout for a particular portlet should contain a unique String, such as the portlet name itself, to avoid conflicts between different portlets that have been added to the same page. For example if you have two portlets that both have a form with the name “form”, they would have conflicts when added to the same page. So it is recommended that the name of the form contain the portlet name.




Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.