struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafert, Tim" <traf...@tanning.com>
Subject Digester addCallParam question
Date Wed, 01 Aug 2001 20:48:43 GMT
Should the addCallParam be able to pass attributes (not just element body
values)?
 
Sample xml:
 
<thing-definition>
  <thing name="name1">
    <config key="theKey" value="theValue"/>
  </thing>
</thing-definition>
 
Sample code:
      aDigester.addObjectCreate("thing-definition/thing","ThingClass");
      aDigester.addSetProperties("thing-definition/thing");
 
aDigester.addCallMethod("thing-definition/thing/config","addConfig",2);
      aDigester.addCallParam("key",0);
      aDigester.addCallParam("value",1); 
 
I cannot seem to get the addCallParam calls to work referencing attributes
of the config element (nulls are always passed in to the addConfig method).
I can change the xml to to make key and value actual elements and read the
values from the body and reference them within addCallParam via
"thing-definition/thing/config/key" - but was hoping to avoid that...
 
The docs say:
"You can specify that the parameter value be taken from a particular named
attribute, or from the nested body content of this element"
 
BUT I don't see anyway to reference the named attribute here...  What am I
missing?
 
Thanks!!
 
Tim Rafert

 

Mime
View raw message