You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rajasekhar Atteri <Ra...@Mentisys.com> on 2002/09/12 23:25:35 UTC
Help with iterating over a Map
I have an ActionForm that contains a bean called domainDef. domainDef
contains a Map of domainObjectDefs.
How do I iterate over the map and print the properties of each
domainObjectDef?
I tried the following but got a ClassCastException:
<logic:iterate name="domainDefForm"
property="domainDef.domainObjectDefs"
id="obj"
type="com.mentisys.eexplorer.vds.modeldef.DomainObjectDef" >
logic
</logic:iterate>
I was finally able to iterate like this:
<nested:present property="domainDef">
<nested:nest property="domainDef">
<nested:iterate id="mapEntry" name="domainDef"
property="domainObjectDefs"
type="java.util.Map.Entry">
nested
</nested:iterate>
</nested:nest>
</nested:present>
But I am still not able to copy each entry to a Bean to retrieve its
properties.
Thanks in advance.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>