Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.0-alpha1
-
None
Description
When loading PortletAppDD, all portlet's init params are lost. The reason is:
Class InitParamDD is in the common package for both portlets and servlets. But in fact, the XML syntax are not the same: for servlets, an init param is defined by <param-name> and <param-value> elements, while for portlets, an init param is defined by <name> and <value> elements.
This bug may be fixed by updating the castor mapping file 'castor-portlet-xml-mapping.xml' ( in portlet-descriptor-impl/src/resources/xml/org/apache/pluto/descriptors/services/castor/). I changed the following elements, and get the problem resolved.
<class name="org.apache.pluto.descriptors.portlet.PortletDD">
... ... ... ...
<field name="InitParams" type="org.apache.pluto.descriptors.common.InitParamDD" collection="arraylist">
<bind-xml name="init-param" node="element" />
</field>
... ... ... ...
</class>
<class name="org.apache.pluto.descriptors.common.InitParamDD">
<map-to xml="init-param"/>
<field name="ParamName" type="java.lang.String">
<bind-xml name="name" />
</field>
<field name="ParamValue" type="java.lang.String">
<bind-xml name="value" />
</field>
</class>
Regards.
ZHENG Zhong