JavaBean property.
The second resolution strategy is primarily expected to be used with web
pages containing multiple submit buttons. The 'name' attribute of each
button should be set to the mapped method name, while the 'value' attribute
is normally displayed as the button label by the browser, and will be
ignored by the resolver.
Note that the second strategy also supports the use of submit buttons of
type 'image'. That is, an image submit button named 'reset' will normally be
submitted by the browser as two request paramters called 'reset.x', and
'reset.y'. When checking for the existence of a paramter from the
methodParamNames
list, to indicate that a specific method should
be called, the code will look for request parameter in the "reset" form
(exactly as spcified in the list), and in the "reset.x" form ('.x' appended to
the name in the list). In this way it can handle both normal and image submit
buttons. The actual method name resolved if there is a match will always be
the bare form without the ".x".
Note: If both strategies are configured, i.e. both "paramName"
and "methodParamNames" are specified, then both will be checked for any given
request. A match for an explicit request parameter in the "methodParamNames"
list always wins over a value specified for a "paramName" action parameter.
For use with either strategy, the name of a default handler method to use
when there is no match, can be specified as a JavaBean property.
For both resolution strategies, the method name is of course coming from
some sort of view code, (such as a JSP page). While this may be acceptable,
it is sometimes desireable to treat this only as a 'logical' method name,
with a further mapping to a 'real' method name. As such, an optional
'logical' mapping may be specified for this purpose.
author:
Rod Johnson
author:
Juergen Hoeller
author:
Colin Sampaleanu
See Also: ParameterMethodNameResolver.setParamName
See Also: ParameterMethodNameResolver.setMethodParamNames
See Also: ParameterMethodNameResolver.setLogicalMappings
See Also: ParameterMethodNameResolver.setDefaultMethodName