3
我在用下面的代碼問題提交背景:環路
<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>
說我結束了以下按鈕:
<input type="submit" name="button" id="button" value="remove 12339020">
<input type="submit" name="button" id="button" value="remove 2504658">
點擊任一按鈕將只觸發事件onRemoveLocation
與上下文2504658
。
我猜第二個提交組件是重寫第一個註冊的事件處理程序,所以他們最終都調用第二個組件事件處理程序。
我曾嘗試將clientId
設置爲獨特的東西,但沒有幫助。
我需要刪除按鈕來提交相同的表單,因爲用戶可以更新一個元素的名稱並刪除第二個在同一個操作。
建議感激,p。
(掛毯5.1.0.5)
謝謝henning。 – pstanton 2011-05-16 21:10:27