You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arno Schumacher <ar...@brokat.com> on 2000/07/28 16:29:12 UTC
Bug in CallParamRule
Hi
I found a bug in CallParamRule
Arno
digester.addObjectCreate ( ELEM_REQ,
FSRepositoryRequestInitializer.class.getName() );
digester.addSetProperties ( ELEM_REQ ); //
locale attribue
digester.addCallMethod ( ELEM_REQ_PARAM, "addParameter", 2 );
digester.addMethodParam ( ELEM_REQ_PARAM, 0 , ATTR_NAME ); //
name attribue
digester.addMethodParam ( ELEM_REQ_PARAM, 1 , ATTR_VALUE ); //
value attribue
/**
* Process the start of this element.
*
* @param attributes The attribute list for this element
*/
public void begin(AttributeList attributes) throws Exception {
if (attributeName != null)
bodyText = attributes.getValue(attributeName);
---> Writes attribute, OK
}
/**
* Process the body text of this element.
*
* @param bodyText The body text of this element
*/
public void body(String bodyText) throws Exception {
if (attributeName == null)
this.bodyText = bodyText.trim();
else
#######################################
this.bodyText = null;
########################################
---> Overwrites already written attribute with null !!!!
}