I you want to iterate a Map you will have to expose a getMyMap or whatever
the name of your proerty is.
The documentation for logic:iterate is prettry straight-forward.

-----Original Message-----
From: Mark Ayad [mailto:mark@;javamark.com]
Sent: 11 November, 2002 13:21
To: Struts Users Mailing List
Subject: 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);
    }
}


______________________________________________

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

______________________________________________

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to