Greetings,

I've got a component which does not use a template (.tml) file, but rather
renders the component all in Java code using the render phases and
MarkupWriter.  The component includes an action event handler which is
envoked via JavaScript.  I've done this with other components, but they used
templates.  For this particular component I can not use a template.

My problem is that the action handler doesn't seem to be visible, even
though the event method is annotated with the OnEvent annotation.

For example (pseudo)

Component Class:


public String getClientId() { return 'MyComponent'; }

@OnEvent(component="myEventHandler", value=EventConstants.ACTION)

public Object myEventHandler() {

        return "Hello World"

}


JavaScript:


AjaxRequest.post('http://myurl.host.com/pagename/MyComponent.myEventHandler');


Does Tapestry require Action events to be declared in templates in order for
them to be invoked, or can I simply use the @OnEvent annotation to register
the event handler?

Thanks,

Marcel

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/OnEvent-Action-Handler-Without-Template-tp5429499p5429499.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Reply via email to