On Mon, Jan 22, 2018 at 7:49 PM, Tyler Wilcock <twilc...@widen.com> wrote:

> Hi all.


Hi!


>   I have some components being rendered in a loop.  On initial
> render, everything comes out fine.  However, when I try to click on an
> eventlink within one of the rendered components, I get an application
> exception.  What is going wrong here?
>

You're not passing any context to the remove EventLink. From your code:

<t:eventlink event="remove" class="remove-filter-icon">&times;</t:eventlink>

The request triggered by clicking the EventLink is different from the one
which rendered the HTML and Tapestry 5 doesn't keep the rendering state
between requests. You need to pass the needed information to the EventLink
so it can relay it to the corresponding event handler method.

You should add context="[reference to what you want to delete]" to your
EventLink and a corresponding parameter to onRemove().

--
Thiago

Reply via email to