I want to create a Restaurant Menu editor. So a menu has a few properties like title and start and end dates for seasonal menus.
So I have 3 action form or nested pojo's
MenuForm CourseForm DishBean
I used lazyMap and lazyList to save scoping to session.
MenuForm - has a lazyList or nested courses.
CourseForm - has a lazyMap of dishes and a getKeys() method that returns map.keySet().toArray()
and dishes are just plain string properties.
public DishBean getDish(String key)
public void setDish(String key,DishBean dish)
The jsp stuff looks something like this.
<html:text property="title" />
<c:forEach var="course" items="${menuForm.courses}">
<html:text name="course" property="title" indexed="true" />
<c:forEach var="key" items="${course.keys}">
<html:text name="course" property="dish(${key}).name" indexed="true" />
</c:forEach>
</c:forEach>
its not quite as tidy as 2 dimensional array support, but it pretty clean looking.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]