Hi everybody,
I'd like to do something very simple. Assume we have this piece of HTML:
...
...
I submit this to an action, which looks like that:
class VerySimpleAction extends ActionSupport {
private Map amount;
public String execute() throws Exception {
System.out.println(amount.ge
--- On Tue, 9/16/08, tREXX - <[EMAIL PROTECTED]> wrote:
> class VerySimpleAction extends ActionSupport {
> private Map amount;
> public String execute() throws Exception {
> System.out.println(amount.get(10));
> System.out.println(amount.get(20));
> }
> /* ??? */
> }
>
> What cod
Mhh... I guess the getter method doesn't help, since I don't want to access
the properties of the action from JSP. I just want to *receive* the
submitted indexed parameters from the HTML-snippet, which means I need some
sort of a setter method. I already tried
public void setAmount(Map amount) {
> Mhh... I guess the getter method doesn't help, since I
> don't want to access the properties of the action from JSP.
Too much cut, not enough paste.
> Ok, i could add each Map to a collection and than loop
> through the collection and each keySet later in the execute
> method but that's plain u
Hi Dave,
Ok, i've tried that one and it works like it should.
So that getter method works as kind of a "type hint" to the framework so
that struts knows it has to convert the parameter "amount" to the given
Map - Is that correct? Up to now I've only added getter
methods to struts-actions when i r
Your get/set method signatures provide a *huge* hint to the conversion magic
logic. If you are curious to see how this actually works, take a look at
Ognl, OgnlUtil amd OgnlRuntime. If you can make it through the reflection
code, it is quite amazing.
Scott
tREXX - wrote:
>
> Hi Dave,
>
6 matches
Mail list logo