THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
A more sophisticated approach would be to allow controls control listeners to register be invoked for Ajax requests. A special AjaxListener can be set as a Control listener, that will be invoked if the incoming request targets the that control:
Code Block | ||||
---|---|---|---|---|
| ||||
public MyPage extends Page { public onInit() { ActionLink link = new ActionLink("link"); link.setActionListener(new AjaxListener() { public Partial onAjaxAction(Control resource, Event event) { Partial partial = new Partial(); partial.add(new Label("hello")); return partial; } }); } } |
...