Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
titleMyPage.java
borderStylesolid
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;
      }
    });
  }
}

...