You implement the ParameterAware interface on your Action. Struts calls
your action's setParameters(Map) method passing you the map of all the
parameters that were submitted by the form. You use the map in your
action's execute() method to fulfill it's reason for being.
(*Chris*)
On Wed, May 1
If my action has "map" and getter getMap(), how would I specify the
name= field in my struts tags to fetch specific values from the map?
Mitch
On 05/11/2011 02:32 PM, Dave Newton wrote:
Not sure how to elaborate on using a map. Expose a map, use whatever
key makes sense? Iterate over the k
- Original Message -
From: Mitch Claborn
To: user@struts.apache.org
Sent: Wed May 11 14:03:33 2011
Subject: Retrieving values for which there is no specific getter
In Struts 2, if my Action class has a variable named "fred" and a getter
"getFred()", a will call that getter to
ret
On Wed, May 11, 2011 at 3:29 PM, Mitch Claborn wrote:
> Can you elaborate a bit? My values will not necessarily be sequential.
Not sure how to elaborate on using a map. Expose a map, use whatever
key makes sense? Iterate over the keys using whatever comparator you
need? What do you want to know?
Can you elaborate a bit? My values will not necessarily be sequential.
mitch
On 05/11/2011 02:14 PM, Dave Newton wrote:
On Wed, May 11, 2011 at 3:03 PM, Mitch Claborn wrote:
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
I think the ParameterAware is for setting values into my Action. I need
to get the values from my action, into the HTML form.
mitch
On 05/11/2011 02:07 PM, Chris Pratt wrote:
Not as such, but you can implement the ParameterAware[1] interface and
retrieve the from the supplied map.
(*Chris
On Wed, May 11, 2011 at 3:03 PM, Mitch Claborn wrote:
> 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?
No, but you could use a map, or a collection if they're sequential as you show.
Dave
-
Look at the ModelDriven approach
- Original Message -
From: Mitch Claborn
To: user@struts.apache.org
Sent: Wed May 11 14:03:33 2011
Subject: Retrieving values for which there is no specific getter
In Struts 2, if my Action class has a variable named "fred" and a getter
&quo
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 wrote:
> In Struts 2,
In Struts 2, if my Action class has a variable named "fred" and a getter
"getFred()", a 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
ex
10 matches
Mail list logo