| org.apache.wicket.ajax.AbstractDefaultAjaxBehavior org.apache.wicket.ajax.AjaxEventBehavior
All known Subclasses: org.apache.wicket.ajax.form.AjaxFormSubmitBehavior, org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior, org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationBehavior,
AjaxEventBehavior | abstract public class AjaxEventBehavior extends AbstractDefaultAjaxBehavior (Code) | | An ajax behavior that is attached to a certain client-side (usually
javascript) event, such as onClick, onChange, onKeyDown, etc.
Example:
WebMarkupContainer div=new WebMarkupContainer(...);
div.setOutputMarkupId(true);
div.add(new AjaxEventBehavior("onclick") {
protected void onEvent(AjaxRequestTarget target) {
System.out.println("ajax here!");
}
}
This behavior will be linked to the onclick javascript event of the div
WebMarkupContainer represents, and so anytime a user clicks this div the
AjaxEventBehavior.onEvent(AjaxRequestTarget) of the behavior is invoked.
since: 1.2 author: Igor Vaynberg (ivaynberg) |
AjaxEventBehavior | public AjaxEventBehavior(String event)(Code) | | Construct.
Parameters: event - event this behavior will be attached to |
onCheckEvent | protected void onCheckEvent(String event)(Code) | | Parameters: event - |
onEvent | abstract protected void onEvent(AjaxRequestTarget target)(Code) | | Listener method for the ajax event
Parameters: target - |
setThrottleDelay | final public AjaxEventBehavior setThrottleDelay(Duration throttleDelay)(Code) | | Sets the throttle delay for this behavior. Throttled behaviors only
execute once withing the given delay even though they are triggered
multiple times.
For example, this is useful when attaching this behavior to the
onkeypress event. It is not desirable to have an ajax call made every
time the user types so we throttle that call to a desirable delay, such
as once per second. This gives us a near real time ability to provide
feedback without overloading the server with ajax calls.
Parameters: throttleDelay - throttle delay this for chaining |
|
|