You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Ayad <ma...@javamark.com> on 2002/11/11 12:21:06 UTC

Mab-backed Iteration

I would like to iterate the elements in a Map-backed action form in my JSP.  How do I get a handle on the Map used in the page a.k.a what do I use for the name="?????"


<logic:iterate id="element" name="?????">
Next element is <bean:write name="element" property="value"/>
</logic:iterate> 

The Map Backed form bean is:

public MapForm extends ActionForm {

    private final Map values = new HashMap();

    public void setValue(String key, Object value) {
        values.put(key, value);
    }

    public Object getValue(String key) {
        return values.get(key);
    }
}