Re: Map-backed forms in Struts2

2007-04-17 Thread James Navin
Ok. I read the OGNL spec and it looks like the way of using maps etc. is subtley different from Struts1. My JSP now looks like and the associated Action class has methods public void setAttribute(String key, Object value) public Object getAttribute(String key) The setAttribute method is still

Re: Map-backed forms in Struts2

2007-04-17 Thread Lance
Do you have a getValue(String key) method? I am not a s2 user but I have read the OGNL spec so sorry if I'm wrong but OGNL needs public PropertyType getPropertyName(IndexType index) and public void setPropertyName(IndexType index, PropertyType value) http://www.ognl.org/2.6.9/Documentation/

Map-backed forms in Struts2

2007-04-16 Thread James Navin
Hi all, A system I am developing requires forms to be generated dynamically at runtime based on data stored in a database. I have read that it is possible to use map-backed forms in Struts1 to achieve this using something of the form '' where the associated Action class has a method of the form '