- onMouseOver
- onMouseOut
- onFocus
- onBlur
- onKeyUp
- onKeyDown
- etc.
To handle a JavaScript event e.g. onMouseOver on an element on the page hierarchy, add the following:
add(new AjaxEventBehavior("onMouseOver")
protected void onEvent(AjaxRequestTarget target) {
// do something.....
}
}
);
AjaxFormSubmitBehavior can be used in a similar way to achieve the same results when it is necessary to capture information for processing (e.g. real time search)
Also note that for very chatty Ajax events like onKeyUp & onKeyDown, setThrottleDelay can be used.
No comments:
Post a Comment