public abstract class FieldAjaxEventBehavior
extends org.apache.wicket.ajax.AjaxEventBehavior
implements org.apache.wicket.ajax.markup.html.IAjaxLink
IBehavior
to any component. You can also make the component invisible and make it as a proxy
trigger; so other custom/pure JavaScript components can call this say via a JQuery .trigger() and put in custom info
in the onClick of this component before it is triggered. This way, it can also act like a Bridge for non Wicket Java-Script components
to submit info to Wicket AJAX.Constructor and Description |
---|
FieldAjaxEventBehavior(String event,
Map<String,String> idMap,
Map<String,String> valueMap) |
Modifier and Type | Method and Description |
---|---|
protected CharSequence |
decorateCallbackUrl(CharSequence callbackUrl)
Decorate CallbackUrl : This is the script executed when the AJAX call is made to Wicket on the server.
|
protected abstract String |
eventAction(org.apache.wicket.ajax.AjaxRequestTarget target,
Map<String,String[]> paramMap)
The action to take on a valid request with its request Parameter Map included
|
protected void |
eventFailure(org.apache.wicket.ajax.AjaxRequestTarget target,
Map<String,String[]> paramMap)
The action to be taken in-case there was some fault in the AJAX request
|
protected org.apache.wicket.ajax.IAjaxCallDecorator |
getAjaxCallDecorator() |
protected CharSequence |
getBody()
The part of the callback URL that can carry back data from the client
|
protected CharSequence |
getCallbackScript(boolean onlyTargetActivePage) |
CharSequence |
getCallbackUrl(boolean onlyTargetActivePage)
The Script that is called when the button is clicked to relay info back to the Server via Ajax
|
org.apache.wicket.ajax.IAjaxCallDecorator |
getCallDecorator() |
Map<String,String> |
getIdMap() |
Map<String,String> |
getValueMap() |
boolean |
isPost() |
void |
onClick(org.apache.wicket.ajax.AjaxRequestTarget target) |
protected void |
onEvent(org.apache.wicket.ajax.AjaxRequestTarget target)
Server handler code, that is executed after {@link this#getCallbackUrl(boolean) executes on client
|
FieldAjaxEventBehavior |
setCallDecorator(org.apache.wicket.ajax.IAjaxCallDecorator callDecorator) |
void |
setIdMap(Map<String,String> idMap) |
FieldAjaxEventBehavior |
setPost(boolean post) |
void |
setValueMap(Map<String,String> valueMap) |
generateCallbackScript, getEvent, getEventHandler, onCheckEvent, onComponentTag, respond, setThrottleDelay
findIndicatorId, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, renderHead, throttleScript
bind, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution
public final CharSequence getCallbackUrl(boolean onlyTargetActivePage)
getCallbackUrl
in class org.apache.wicket.behavior.AbstractAjaxBehavior
protected final CharSequence getCallbackScript(boolean onlyTargetActivePage)
getCallbackScript
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
protected void onEvent(org.apache.wicket.ajax.AjaxRequestTarget target)
onEvent
in class org.apache.wicket.ajax.AjaxEventBehavior
public void onClick(org.apache.wicket.ajax.AjaxRequestTarget target)
onClick
in interface org.apache.wicket.ajax.markup.html.IAjaxLink
protected final org.apache.wicket.ajax.IAjaxCallDecorator getAjaxCallDecorator()
getAjaxCallDecorator
in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
protected abstract String eventAction(org.apache.wicket.ajax.AjaxRequestTarget target, Map<String,String[]> paramMap)
target
- protected void eventFailure(org.apache.wicket.ajax.AjaxRequestTarget target, Map<String,String[]> paramMap)
target
- protected CharSequence decorateCallbackUrl(CharSequence callbackUrl)
PARAM_ID
=paramId
&PARAM_VALUE
={paramValue
} ; using idMap
callbackUrl
- protected CharSequence getBody()
decorateCallbackUrl(CharSequence)
public org.apache.wicket.ajax.IAjaxCallDecorator getCallDecorator()
public FieldAjaxEventBehavior setCallDecorator(org.apache.wicket.ajax.IAjaxCallDecorator callDecorator)
public boolean isPost()
public FieldAjaxEventBehavior setPost(boolean post)
post
- Copyright © 2018. All rights reserved.