struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: [BeanUtils] Map can or not?
Date Wed, 18 Jun 2003 12:24:33 GMT
Cool.

So if I wanted an ActionForm but the fieldname (or some of them) on it were
determined only at runtime I could simply make all the 'runtime' fields be
nested properties of that ActionForm property that had the Map?

<input name="bob.anything"...

public void setBob(Map bob)...
public Map getBob()....


String anything = form.getBob().get("anything");


I presume id have to instantiate the Map myself before the form was
populated though?


-----Original Message-----
From: Gemes Tibor [mailto:tib@i-trade.hu]
Sent: Wednesday, 18 June 2003 20:11
To: Struts Users Mailing List
Subject: Re: [BeanUtils] Map can or not?


Andrew Hill írta:

>Are PropertyUtils.populate() and getProperty() (etc...) smart enough to
work
>with a Map instead of a bean and use the property name as a key into it?
>
>
yes




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


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


Mime
View raw message