By design. Default value of LinkSubmit's "defer" parameter is true. http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/LinkSubmit.html
On 27 August 2013 01:27, Michael Gentry <[email protected]> wrote: > Hi Ilya, > > I just used the standard Tapestry LinkSubmit component and, like you > said, it exhibits the same issues in an AjaxFormLoop. I don't know if > this is by design or an oversight/bug. > > mrg > > > On Sat, Aug 24, 2013 at 7:32 PM, Ilya Obshadko <[email protected]> > wrote: > > Okay, actually replacing t:ajaxformloop with t:loop and setting p:defer > to > > false helps to resolve this. > > Thanks for your feedback. > > > > > > On Sun, Aug 25, 2013 at 10:20 AM, Ilya Obshadko <[email protected] > >wrote: > > > >> Furthermore, replacing t:ajaxformloop with t:loop doesn't help it > either. > >> Will investigate t:submit source code. > >> > >> > >> On Sun, Aug 25, 2013 at 10:07 AM, Ilya Obshadko < > [email protected]>wrote: > >> > >>> Thank you. Original LinkSubmit has exactly the same issue. > >>> > >>> > >>> On Sunday, August 25, 2013, Michael Gentry wrote: > >>> > >>>> Hi Ilya, > >>>> > >>>> I was struggling with the same exact problem yesterday. Apparently > >>>> the AjaxFormLoop doesn't work like a regular Loop and the submit > >>>> handler always receives the last iteration value/context. Even using > >>>> t:defer on the Submit didn't help. I ended up using a LinkSubmit* > >>>> with some CSS to make it look like a button and enough t:context > >>>> parameters to allow me to figure out which "button" was being clicked > >>>> on. > >>>> > >>>> mrg > >>>> > >>>> * We have our own custom version of LinkSubmit (which I didn't write, > >>>> but is based upon the original) which has a comment at the top about > >>>> making LinkSubmit handle t:context correctly in loops. I don't know > >>>> if that was an old issue which is resolved now or if it will impact > >>>> you, but wanted to mention it in case LinkSubmit doesn't work for you. > >>>> > >>>> > >>>> On Sat, Aug 24, 2013 at 8:32 AM, Ilya Obshadko < > [email protected]> > >>>> wrote: > >>>> > I have t:ajaxformloop iterating over a property and t:submit using > >>>> context > >>>> > values from the loop. Code looks like: > >>>> > > >>>> > @Property > >>>> > private SomeType iteratedValue; > >>>> > > >>>> > void onSelectedFromDoSomething ( SomeType iteratedValue ) { > >>>> > // some stuff depends on iteratedValue here > >>>> > } > >>>> > > >>>> > ---- > >>>> > > >>>> > <t:zone t:id="zoneName"> > >>>> > <t:ajaxformloop p:source="source" p:value="iteratedValue"> > >>>> > <!-- some code here --> > >>>> > <t:submit t:id="doSomething" p:context="iteratedValue" > >>>> p:zone="zoneName"/> > >>>> > <!-- some code there --> > >>>> > </t:ajaxformloop> > >>>> > </t:zone> > >>>> > > >>>> > At the time of submit iteratedValue *always* contains last iterated > >>>> value > >>>> > from the loop. Apparently I'm getting wrong results in the end: no > >>>> matter > >>>> > where submit was clicked, handler always receives the value from the > >>>> last > >>>> > loop iteration. Any hints how to fix this? > >>>> > > >>>> > > >>>> > -- > >>>> > Ilya Obshadko > >>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: [email protected] > >>>> For additional commands, e-mail: [email protected] > >>>> > >>>> > >>> > >>> -- > >>> Ilya Obshadko > >>> > >>> > >>> > >> > >> > >> -- > >> Ilya Obshadko > >> > >> > > > > > > -- > > Ilya Obshadko > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
