I'd just like to be sure that I'm on the right path. I did my first update
action that is operating on a List of objects similar to the example from
the Showcase. Difference is I can't recreate them, like the Showcase does.
So, I got my List of objects from the database, then threw them into a Map
keyed on the id of the objects. I then exposed the Map with a getter on the
action.
In the JSP I iterate over the List, but use references to the Map using OGNL
notation:
<s:iterator value="partyRoleTypes">
<s:select name="partyRoleTypesMap['%{id}'].isActive"
value="%{isActive}" list="yesNoList" listKey="value"
listValue="label" />
<s:textfield name="partyRoleTypesMap['%{id}'].shortDescription"
value="%{shortDescription}" />
<s:textfield name="partyRoleTypesMap['%{id}'].description"
value="%{description}" size="50" />
</s:iterator>
Is this a reasonable approach to updating a list of items? Or is there
another recommended best practice for this?
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]