On Tue, 20 May 2014 10:05:11 -0300, Ilya Obshadko <ilya.obsha...@gmail.com> wrote:

Regardless of which submit is clicked, the event is triggered only on the
last component in the loop. I know that p:defer parameter is supposed to
handle this, but adding p:defer="false" doesn't help. Any ideas how to
handle this?

Try using the context parameter of the Submit component so you can pass some value so your event handler method knows which object to work on. Remember: the event is a different request from the one that renders HTML, so everything which isn't persisted (and you should avoid this) is lost. Using the context parameter is storing the information in an URL inside the generated HTML. You're probably persisting the loop variable, otherwise you'd just get an NPE when accessing it.

The defer parameter doesn't do what you think it does and wouldn't fix the cause of your issue, which is not providing the context for your Submit component.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to