My current problem regards updating context information dynamically in FormInjector
, my previous question Updating a zone inside a form in Tapestry 5 probably contains useful background information.
I added the following in my template.
<div t:type="FormInjector" t:id="injector" t:context="item.id"/>
And the following in my component class.
@OnEvent(component = "injector")
Block loadItemFields(String id) {
item = itemRepository.find(id);
return itemFieldsBlock;
}
Everything is working fine, new form fields appear, but the search is always done with the same id
. I would like to change the id
with JavaScript before triggering the event, but I don't know how to achieve this.
If there is additional information required I am happy to supply it.