Hi everybody,

I'd like to do something very simple. Assume we have this piece of HTML:

...
<input type="text" name="amount[10]" value="33.3" />
<input type="text" name="amount[20]" value="66.6" />
...

I submit this to an action, which looks like that:

class VerySimpleAction extends ActionSupport {
  private Map<Integer, Float> amount;
  public String execute() throws Exception {
     System.out.println(amount.get(10));
     System.out.println(amount.get(20));
  }
  /* ??? */
}

What code do i have to write in place of the question marks, so that
system.out will write "33.3" and "66.6"? :-)

Thanks for your help.

André

Btw: I've checked the documentation but I haven't found an example that was
simple enough to solve exactly the problem described above. I guess, I just
need the Struts 2 equivalent for Struts 1 Indexed properties, right?

Reply via email to