commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Blom <steve_blom2...@yahoo.com>
Subject [digester] Key/Value setting (oops, forgot subject heading)
Date Tue, 09 Nov 2004 18:41:39 GMT

Hi,
I'm trying to put contents into a map object like so:
<people>
  <person id="Jon">
    ...
  </person>
  <person id="Sue">
    ...
  </person>
<people>
I have a person object, that i want to store in a map
with the key being the person id. Is this possible? I
think I'm close, but missing on something.
digester.setObjectCreate("people", java.util.HashMap);
digester.setObjectCreate("people/person",
bean.Person.class);
digester.setCallMethod("people/person", "put", 2);
digester.setCallParam("people/person", 0, "id");
digester.setCallParam("people/person", 1); ?

The id is set right, but the object value isn't. What
am i missing?
Thanks - Steve



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message