struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Problem passing form fields with autocompleter
Date Thu, 12 Apr 2007 21:36:07 GMT
--- Scott Nesbitt <scottnesbitt@yahoo.com> wrote:
> Not sure why it should be getBar().  The name of the
> hidden field is foo, so shouldn't that be the
> variable that has the getter and setter?

You guys are both right.

The argument to the 'value' attribute is an object:

> > >   <s:hidden name="foo" value="bar"/>

*is* looking for a getBar(), and you also need a
get/setFoo() to get the value back to the action.

If you wanted a hardcoded string value, for example,
you'd have to say value="%{'bar'}" (or something like
that) etc.

d.



       
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/

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


Mime
View raw message