org.wicketstuff.push.dojo
Class AbstractDefaultDojoBehavior
java.lang.Object
org.apache.wicket.behavior.AbstractBehavior
org.apache.wicket.behavior.AbstractAjaxBehavior
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
org.wicketstuff.push.dojo.AbstractDefaultDojoBehavior
- All Implemented Interfaces:
- java.io.Serializable, org.apache.wicket.behavior.IBehavior, org.apache.wicket.behavior.IBehaviorListener, org.apache.wicket.IClusterable, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IHeaderContributor
- Direct Known Subclasses:
- AbstractRequireDojoBehavior
public abstract class AbstractDefaultDojoBehavior
- extends org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
Handles event requests using Dojo.
This class is mainly here to automatically add the javascript files you need.
As header contributions are done once per class, you can have multiple
instances/ subclasses without having duplicate header contributions.
this class use AjaxRequestTarget to respond to XMLHttpRequest
this behavior can work with a DojoIndicatorBehavior to set up an
Indicator when a request has been sent and waiting for the response. This
Behavior auto manage Indicator.
By default this behavior will use the package dojo distributiuon included in
this jar. If you want to use an other Dojo Distribution (A custom one to fit
to your need), You should write the following code in your
Application to use a custom CompressedResourceReference
CompressedResourceReference myCustomDojo = new CompressedResourceReference([...]);
setMetaData(AbstractDefaultDojoBehavior.USE_CUSTOM_DOJO_DIST, myCustomDojo);
WARNING : the package dojo distribution contains some patches on dojo.
If you use your own distribution it can break some component behaviors.
- Author:
- Eelco Hillenius
- See Also:
- Dojo< /a>,
Serialized Form
|
Field Summary |
static org.apache.wicket.ResourceReference |
DOJO
reference to the dojo support javascript file. |
static org.apache.wicket.MetaDataKey<org.apache.wicket.markup.html.resources.CompressedResourceReference> |
USE_CUSTOM_DOJO_DIST
a Unique key to know if a CompressedResourceReference is set by the user in
order to use a custom dojo distribution |
| Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
INDICATOR |
| Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener |
INTERFACE |
|
Method Summary |
org.apache.wicket.ResourceReference |
getDojoResourceReference()
Get the reference to the Dojo scripts. |
void |
renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
|
| Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior |
findIndicatorId, generateCallbackScript, getAjaxCallDecorator, getCallbackScript, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, respond, throttleScript |
| Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior |
bind, getCallbackUrl, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution |
| Methods inherited from class org.apache.wicket.behavior.AbstractBehavior |
afterRender, beforeRender, cleanup, detach, detachModel, exception, isEnabled, isTemporary, onException, rendered |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USE_CUSTOM_DOJO_DIST
public static final org.apache.wicket.MetaDataKey<org.apache.wicket.markup.html.resources.CompressedResourceReference> USE_CUSTOM_DOJO_DIST
- a Unique key to know if a CompressedResourceReference is set by the user in
order to use a custom dojo distribution
DOJO
public static final org.apache.wicket.ResourceReference DOJO
- reference to the dojo support javascript file.
AbstractDefaultDojoBehavior
public AbstractDefaultDojoBehavior()
renderHead
public void renderHead(org.apache.wicket.markup.html.IHeaderResponse response)
- Specified by:
renderHead in interface org.apache.wicket.markup.html.IHeaderContributor- Overrides:
renderHead in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
- See Also:
wicket.ajax.AbstractDefaultAjaxBehavior#renderHead(wicket.markup.html.IHeaderResponse)
getDojoResourceReference
public org.apache.wicket.ResourceReference getDojoResourceReference()
- Get the reference to the Dojo scripts.
- Returns:
Copyright © 2010. All Rights Reserved.