Hi I'm trying to get indexed lists working so that I can get any amendments back into my model. At the moment I've got <s:form ........> <s:iterator value="valueables" status="status"> <s:set name="count" value="%{#status.index + 1}"/> <s:textfield name="valueables[%{#status.index}].text" value="%{text}"/> <s:textfield name="valueables[%{#status.index}].make" value="%{make}"/> <s:textfield name="valueables[%{#status.index}].value" value="%{value}"/> </s:iterator> <%-- And add one extra line --%> <s:textfield name="valueables[%{#count}].text" value="%{text}"/> <s:textfield name="valueables[%{#count}].make" value="%{make}"/> <s:textfield name="valueables[%{#count}].value" value="%{value}"/> <s:submit ......./>
So, the iterator loops for each entry in my List valuables (each List entry contains an object with relevant setters and getters) and then creates an empty row for the user to start adding additional data. Any changes made to the fields generated by the iterator are being successfully updated in the model, but data in the extra line is not being added to the list. I was under the impression that Struts would automagically add a new line to the list. For added entertainment, could anyone point me to a dojo/javascript tutorial that would allow me to add a further empty line when ever the user completes an empty line without, if possible, submitting the form? Or someother technique that allows the addition of unknown number form fields? Regards --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]