|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.behavior.AbstractBehavior
wicket.behavior.AbstractAjaxBehavior
public abstract class AbstractAjaxBehavior
Abstract class for handling Ajax roundtrips. This class serves as a base for javascript specific implementations, like ones based on Dojo or Scriptaculous, or Wicket's default.
| Field Summary |
|---|
| Fields inherited from interface wicket.behavior.IBehaviorListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
AbstractAjaxBehavior()
Construct. |
|
| Method Summary | |
|---|---|
void |
bind(Component hostComponent)
Bind this handler to the given component. |
void |
cleanup()
This method is called either by AbstractBehavior.onRendered(Component) or
AbstractBehavior.onException(Component, RuntimeException) AFTER they called their
respective template methods. |
java.lang.CharSequence |
getCallbackUrl()
Gets the url that references this handler. |
java.lang.CharSequence |
getCallbackUrl(boolean recordPageVersion,
boolean onlyTargetActivePage)
Gets the url that references this handler. |
protected Component |
getComponent()
Gets the component that this handler is bound to. |
protected abstract java.lang.String |
getImplementationId()
Deprecated. The mechanism will be changed for Wicket 2.0, where doubles are filtered in (future) class IHeaderResponse. |
protected void |
onBind()
Called when the component was bound to it's host component. |
protected void |
onComponentRendered()
Called to indicate that the component that has this handler registered has been rendered. |
void |
onComponentTag(Component component,
ComponentTag tag)
Called any time a component that has this behavior registered is rendering the component tag. |
protected void |
onComponentTag(ComponentTag tag)
Called any time a component that has this handler registered is rendering the component tag. |
void |
onRendered(Component hostComponent)
Called when a component that has this behavior coupled was rendered. |
protected void |
onRenderHeadContribution(Response response)
Let this handler print out the needed header contributions. |
protected void |
onRenderHeadInitContribution(Response response)
Do a one time (per page) header contribution that is the same for all ajax variant implementations (e.g. |
void |
renderHead(Response response)
Render to the web response whatever the component wants to contribute to the head section. |
protected void |
writeJsReference(Response response,
PackageResourceReference ref)
Deprecated. use writeJsReference(Response, ResourceReference) instead |
protected void |
writeJsReference(Response response,
ResourceReference ref)
Convenience method to add a javascript reference. |
| Methods inherited from class wicket.behavior.AbstractBehavior |
|---|
detachModel, exception, onException, rendered |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface wicket.behavior.IBehaviorListener |
|---|
onRequest |
| Constructor Detail |
|---|
public AbstractAjaxBehavior()
| Method Detail |
|---|
public final void bind(Component hostComponent)
bind in interface IBehaviorbind in class AbstractBehaviorhostComponent - the component to bind toIBehavior.bind(wicket.Component)public java.lang.CharSequence getCallbackUrl()
public final java.lang.CharSequence getCallbackUrl(boolean recordPageVersion,
boolean onlyTargetActivePage)
recordPageVersion - if true the url will be encoded to execute on the current page
version, otherwise url will be encoded to execute on the
latest page versiononlyTargetActivePage - if true the callback to this behavior will be ignore if the
page is not the last one the user accessed
public final void onComponentTag(Component component,
ComponentTag tag)
IBehavior
onComponentTag in interface IBehavioronComponentTag in class AbstractBehaviorcomponent - the component that renders this tag currentlytag - the tag that is renderedIBehavior.onComponentTag(wicket.Component,
wicket.markup.ComponentTag)public final void onRendered(Component hostComponent)
AbstractBehavior
onRendered in class AbstractBehaviorhostComponent - the component that has this behavior coupledAbstractBehavior.onRendered(wicket.Component)public void cleanup()
AbstractBehaviorAbstractBehavior.onRendered(Component) or
AbstractBehavior.onException(Component, RuntimeException) AFTER they called their
respective template methods. Override this template method to do any
necessary cleanup.
cleanup in class AbstractBehaviorAbstractBehavior.cleanup()public final void renderHead(Response response)
IHeaderContributorNote: This method is kind of dangerous as users are able to write to the output whatever they like.
renderHead in interface IHeaderContributorresponse - Response objectIHeaderContributor.renderHead(wicket.Response)
protected void writeJsReference(Response response,
PackageResourceReference ref)
writeJsReference(Response, ResourceReference) instead
response - ref - reference to add
protected void writeJsReference(Response response,
ResourceReference ref)
response - ref - reference to addprotected final Component getComponent()
protected abstract java.lang.String getImplementationId()
protected void onComponentTag(ComponentTag tag)
tag - the tag that is renderedprotected void onBind()
protected void onComponentRendered()
protected void onRenderHeadContribution(Response response)
response - head containerprotected void onRenderHeadInitContribution(Response response)
response - head container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||