commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wendy Smoak" <>
Subject [digester] Populating a LazyDynaBean with Digester
Date Tue, 18 Jan 2005 03:49:34 GMT
Since Niall confirmed that you can use a LazyDynaBean with JSTL by 
retrieving the underlying map with
>  ${}

I'm now trying to populate a LazyDynaBean with Digester.  I'm okay so far 
with simple String properties:

         digester.addObjectCreate("download", LazyDynaBean.class);

         digester.addCallMethod("download/person/preferredName", "set", 2);
         digester.addObjectParam("download/person/preferredName", 0, 
         digester.addCallParam("download/person/preferredName", 1);

But what do I do with indexed properties where the call to 
LazyDynaBean.set(name,index,value) requires an integer index?  (A person may 
have more than one degree.)

         digester.addCallMethod("download/person/degree", "set", 3);
         digester.addObjectParam("download/person/degree", 0, "degrees");
         //digester.addObjectParam("download/person/degree", 1, 
???integer??? );
         digester.addCallParam("download/person/degree", 2);

Is it possible to set indexed properties with Digester?

A 'normal' bean might have an 'addWhatever' method, but I don't see anything 
helpful in the LazyDynaBean API docs.

Wendy Smoak

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message