You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Zhong ZHENG <he...@gmail.com> on 2005/07/31 09:26:06 UTC

Portlet init params get lost: bad castor mapping file 'castor-portlet-xml-mapping.xml'

Hi, there,

I found another bug in the 1.1.0-ALPHA branch: 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> 

An issue was also created in JIRA for that bug:

http://issues.apache.org/jira/browse/PLUTO-147


Regards. 
ZHENG Zhong 

-- 

ZHENG Zhong
heavyzheng{aT}gmail{d0t}com