Hi, Struts Version - 2.1.7
We have an issue with the Map<String, List<Object>>. Here is the scenario, we are displaying the data from the List on the UI as the text fields. When a user changes and submits the form, the form data has to be saved. We are able to display the data from the List onto the UI. When the form is submitted, the Map is coming back as null in the action class. <s:iterator value="textMap" status="iterStatus"> <s:iterator value="value" status="iterStatus1"> <s:textfield name="textMap['%{key}']['%{#iterStatus1.index}'].name" value="%{name}"/> </s:iterator> </s:iterator> I am also attaching the source code SampleAction.java Sample.java (Pojo representing the Object in the list) struts.xml struts sample.jsp. Please help. Rgds, Satya
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="test" namespace="/test" extends="as-tiles-default"> <action name="testMapsShow" class="test.SampleAction" method="display"> <result name="success">/testapps/sample.jsp</result> </action> <action name="testMapsSave" class="test.SampleAction" method="save"> <result name="success">/testapps/sample.jsp</result> </action> </package> </struts>
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org