struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Lobo <>
Subject How to populate a map of lists in an action form?
Date Tue, 03 May 2005 10:19:07 GMT

I have an action form with a map that can be accessed with getters and 
setters. That map holds lists of elements. The problem is how to 
populate that lists from the html form . I've tried with:

<input name="elementsMap(0).[0]" value="foo">


<input name="elementsMap(0)[0]" value="foo">

but doesn't work.

However, i've implemented a new class child of ArrayList that adds this 
two methods:

    public List getList()
        return this;
    public void setList(List list)

And using this class in the map I can do from javascript:

<input name="elementsMap(0).list[0]" value="foo">

And the population of the ActionForm works properly. ┬┐Does somebody know 
how to fix this problem without the use of this two "ugly" methods?


View raw message