org.wicketstuff.jquery
Class JQueryBehavior
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.wicketstuff.jquery.JQueryBehavior
- All Implemented Interfaces:
- Serializable, IBehaviorListener, IClusterable, IComponentAwareEventSink, IRequestListener, IComponentAwareHeaderContributor
- Direct Known Subclasses:
- CodepressBehaviour, CornerzBehaviour, CropBehaviour, DatePickerBehavior, DnDBehaviour, DnDSortableBehavior, JQueryLavaLampBehavior, LightboxBehaviour, ResizeBehaviour, SliderBehavior, TitleAsHintBehavior
public class JQueryBehavior
- extends AbstractDefaultAjaxBehavior
- Author:
- David Bernard (dwayne)
- See Also:
- Serialized Form
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getChannel, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, throttleScript |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JQUERY_JS
public static final ResourceReference JQUERY_JS
- ResourceReference for jquery-1.2.6 (include by default when
you add the current Behavior).
JQUERY_DEBUG_JS
public static final ResourceReference JQUERY_DEBUG_JS
- ResourceReference for jquery.debug.js (include by
default if wicket's configuration is "development")
INTERFACE_JS
public static final ResourceReference INTERFACE_JS
- ResourceReference for interface-1.2.js (not include
in reponse header)
JQUERY_UI_JS
public static final ResourceReference JQUERY_UI_JS
- ResourceReference for jquery.ui containing core, resizable, draggable, droppable, selectable
jquery-ui-personalized.js
JQUERY_BGIFRAME_JS
public static final ResourceReference JQUERY_BGIFRAME_JS
- ResourceReference for jquery.bgiframe-2.1.1.js (not include
in reponse header)
JQUERY_REGEXP
public static final Pattern JQUERY_REGEXP
JQueryBehavior
public JQueryBehavior()
renderHead
public void renderHead(Component component,
IHeaderResponse response)
- Specified by:
renderHead in interface IComponentAwareHeaderContributor- Overrides:
renderHead in class AbstractDefaultAjaxBehavior
getIncludeJQueryJS
public boolean getIncludeJQueryJS(IHeaderResponse response)
- to be overridden by subclass if you don't want to autodetect wether a jquery.js has already
been added, and thus skip adding JQUERY_JS as a JavascriptReference.
You can either simply return false, or implement your own check to see if a jquery.js
reference has been added either as a HeaderContributor or in a tag of some page
in the hierarchy.
- Parameters:
response - The IHeaderResponse, containing the rendered headers until now
- Returns:
- true if you want renderHead to include the JQUERY_JS in the head.
getOnReadyScript
protected CharSequence getOnReadyScript()
- to be override by subclass if need to run script when dom is ready. The returned script is
wrapped by caller into <script> tag and the "$(document).ready(function(){...}"
- Returns:
- the script to execute when the dom is ready, or null (default)
respond
protected void respond(AjaxRequestTarget target)
- Specified by:
respond in class AbstractDefaultAjaxBehavior
logger
protected org.slf4j.Logger logger()
Copyright © 2013. All Rights Reserved.