struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arron Bates <arr...@pacific.net.au>
Subject Re: Mapped properties - How To
Date Sun, 17 Feb 2002 08:11:01 GMT
Sorry to say, it's not going to work. There's a bug in the PropertyUtils 
class that makes it happen.
You could do some collection tricks and get it coming out in an Array, 
and that would work, but not the mapped property.

Arron.

Erik Tennant wrote:

> The mapped property feature is extremely useful, although somewhat 
> elusive. I've been struggling to get this feature to work, and after 
> spending more time than I would care to admit trying to figure it out, 
> I thought I would share a simple how-to on the matter since I ran 
> across several messages in the archives from people who had similar 
> challenges.
>
> First, I grabbed a nightly build of struts (Feb 15, 2002).
>
> Second, I added an input tag similar to this in my .jsp page:
> <input type="text" name="item(color)" value="blue">
>
> Third, I added the following two methods to my form bean (note: it's 
> important to have the get method, even if you don't plan to use it):
> public Object getItem(String key) {
>
> }
>
> public void setItem(String key, Object value) {
>
> }
>
>
> -Erik
>
>
> -- 
> To unsubscribe, e-mail: 
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
>
>



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


Mime
View raw message