Hi all. 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?
public class SearchFilterContainer
private SearchFilterService searchFilterService;
private SearchFilter currentFilter;
public List<SearchFilter> getChronologicalSearchFilters()
public String getPreFiltersText()
public boolean isAssetStatusFilter()
return currentFilter.getFilterType() == SearchFilterType.ASSET_STATUS;
On Mon, Jan 22, 2018 at 7:49 PM, Tyler Wilcock <[hidden email]> wrote:
> Hi all.
> 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:
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().