I've tried to display on JSP page objects' properties from Map in FormBean. Map is defined as
Map<KeyObject, ValueObject> m
KeyObject has two properties
public class KeyObject implements Comparable<KeyObject> {
private Integer a;
private Integer b;
getters/setters/and rest basic methods
}
On JSP I want to obtain something like code below:
<c:forEach items="${formBean.m}" item="itm">
...
<form:input path="m[itm.key].propertyName" />
...
</c:forEach>
I need to:
- display elements in proper order
- submit objects to map
So is there any simple solution or I should do some "magic"?
Thanks for your time.
Stefan
Some more information. Each object will have other "view" so I try to use c:import
<c:forEach items="${formBean.m}" item="itm">
<c:import url=${itm.value.name}Page.jsp" />
</c:forEach>
and on ...Page.jsp I want to use form's inputs.