The point here is that Sets are not indexable, so i can't name elements by their unique id...
On 6/10/07, Dave Newton <[EMAIL PROTECTED]> wrote:
--- Nicolás Pace <[EMAIL PROTECTED]> wrote: > The main problem is that the only way to access > collection elements with ognl is like accessing an > array, and when i generate those dinamic components > with javascript, i don't know how to name those > elements to have them mapped to the Set. Name them whatever the name of them is in the action. For example, I have a JSP page that uses the following S2 tag for a text input field where exMap is (obviously, I guess) a map with its backing object's id as the map key: <s:textfield name="exMap[%{#r.id}].%{which}[0].foo"/> I dynamically create additional components with the following JavaScript, called from a method taking id, which, and idx parameters: var name = 'exMap[' + id + '].' + which + '[' + idx + '].foo'; var sTag = '<input type="text" name="' + name + '"/>'; This example is a little bit different because each of the map entries is an ordered list (and I formatted and edited heavily so it might be minorly broken), but you get the idea. d. ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]