struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Pratt <thechrispr...@gmail.com>
Subject Re: Retrieving values for which there is no specific getter
Date Wed, 11 May 2011 19:07:25 GMT
Not as such, but you can implement the ParameterAware[1] interface and
retrieve the from the supplied map.
  (*Chris*)

1 -
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/ParameterAware.html

On Wed, May 11, 2011 at 12:03 PM, Mitch Claborn <mitch_ml@claborn.net>wrote:

> In Struts 2, if my Action class has a variable named "fred" and a getter
> "getFred()", a <s:textfield name="fred" /> will call that getter to retrieve
> the value from the action.
>
> Is there some kind of catch-all or generic method that is called to
> retrieve the value for a form field if there is no specific getter?  For
> example, I might have
> <s:textfield name="fred1" />
> <s:textfield name="fred2" />
> ...
> <s:textfield name="fred100" />
>
> I don't want to code a specific getter for each one.
>
> I thought I saw some documentation on the sequence of methods that are
> attempted, but can't find it now.
>
> Mitch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message