Hi all,

i have a weird problem with event handling. I tried to extend an already
existing
and functioning AJAX request event handler with context. But it doesn't
work,
after i changed event link creation and the signature of the event handler.
The event handler is not called, but an tapestry exception is thrown
   "Request event 'autosearchinputchanged' (on component
report/Detail:formcontent.mintautocompletesearch.autosearchfield) was not
handled; you must provide a matching event handler method in the component
or in one of its containers."


But i don't understand, what i did wrong. I'm using tapestry-5.4-beta-37.
Is it wrong to use final EventContext eventContext and RequestParameter
together?




Changed from
-------------------
String listenerURI = componentResources
  .componentResources.createEventLink("autoSearchInputChanged")
  .toAbsoluteURI(secure);


@OnEvent(component = "autoSearchField", value = "autoSearchInputChanged")
void searchForEntries(
    final @RequestParameter(value = "param", allowBlank = true) String
newCriteriaFilter) {
  ...
}



To
-------------------
@Parameter
@Property
private Object[] ajaxContext;

String listenerURI = componentResources
  .createEventLink(event, ajaxContext)
  .toAbsoluteURI(secure);

@OnEvent(component = "autoSearchField", value = "autoSearchInputChanged")
void searchForEntries(
    final EventContext eventContext,
    final @RequestParameter(value = "param", allowBlank = true) String
newCriteriaFilter) {
  ...
}


Kind regards
Diego

Reply via email to