I am having a problem with the following code:
<t:form t:id="locationsForm" t:zone="myZone">
<t:loop t:source="locations" t:value="location" t:encoder="locationEncoder">
<t:textfield t:value="location.name" />
<t:submit t:event="RemoveLocation" t:value="remove ${location.hashCode()}" t:context="${location.hashCode()}" />
</t:loop>
<t:submit t:value="save" />
</t:form>
Say, in the end, the following buttons appear:
<input type="submit" name="button" id="button" value="remove 12339020">
<input type="submit" name="button" id="button" value="remove 2504658">
Pressing any button will only trigger an event onRemoveLocationusing context 2504658.
I assume that the second component of submit overrides the event handler registered with the first, so both of them call the event handler of the second component.
I tried to set it clientIdinto something unique, but that didn't help.
I need delete buttons to submit the same form, as the user can update the name of one element and delete the second in the same operation.
Council rated, pp.
(Tapestry 5.1.0.5)
source
share