Because the For is operating inside a loop, it is not reaching its source on the refresh. Try setting the volatile parameter to true; this will more closely mimic a Foreach from Tapestry 3.0 and will likely fix your issue.
On 12/9/05, Frank Russo <[EMAIL PROTECTED]> wrote: > I'm having a very big problem. We're upgrading from T3 to T4. > > The functionality is assigning roles and subroles to a new user. In the > html page, we had a @Foreach looping on the roles in the system. For > each role, there is the following dropdown: > > <select jwcid="@Any" element="select" > id='ognl:"current"+removeWhiteSpace(role.role)+"RolesSelect"' > multiple="ognl:subrole.isAssigned" size="5"> > > Basically, what this does, for each role, there is a dropdown allowing > the user to assign subroles to that role. > > For T4, I changed the @Foreach to an @For, as follows: > > T3: <span jwcid="[EMAIL PROTECTED]" > source="ognl:newUser.roles" value="ognl:role"> > T4: <span jwcid="[EMAIL PROTECTED]" source="ognl:newUser.roles" > value="ognl:role"> > > I thought this would be straight forward, but the T4 version doesn't > work. I'm not sure if this matters, but there is a caveat. This select > initially has no options. The options are added from another > multi-select using javascript and arrow buttons. > > Again, this worked in T3. What ends up happening is that the request is > made to save the assignments, but the options added to the select are > not saved. > > Is there something very different between the Foreach and the For that > these multi-selects won't be saved? > > Frank Russo > Senior Developer > FX Alliance, LLC > > > -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator, Jakarta Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
