|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.AjaxHandler
Abstract class for handling Ajax roundtrips. This class serves as a base for javascript specific implementations, like ones based on Dojo or Scriptaculous.
| Field Summary | |
protected IResourceStream |
resourceStream
The actual raw resource this class is rendering |
| Constructor Summary | |
AjaxHandler()
Construct. |
|
| Method Summary | |
protected void |
addJsReference(HtmlHeaderContainer container,
PackageResourceReference ref)
Convenience method to add a javascript reference. |
(package private) void |
bind(Component hostComponent)
Bind this handler to the given component. |
protected void |
configure(Response response,
IResourceStream resourceStream)
Configures the response, default by setting the content type and length. |
java.lang.String |
getBodyOnload()
Gets the onload statement(s) for the body component. |
protected java.lang.String |
getBodyOnloadContribution()
Gets the onload statement(s) for the body component. |
protected java.lang.String |
getBodyOnloadInitContribution()
One time (per page) body onload contribution that is the same for all ajax variant implementations (e.g. |
java.lang.String |
getCallbackUrl()
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()
Gets the unique id of an ajax implementation. |
protected abstract IResourceStream |
getResponse()
Gets the response to render to the requester. |
protected java.lang.String |
getResponseType()
Gets the response type mime, e.g. |
(package private) void |
internalOnComponentRendered()
Called to indicate that the component that has this handler registered has been rendered. |
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(ComponentTag tag)
Called any time a component that has this handler registered is rendering the component tag. |
(package private) void |
onRequest()
Called when an Ajax request is to be handled. |
void |
renderHead(HtmlHeaderContainer container)
Render to the web response whatever the component wants to contribute to the head section. |
protected void |
renderHeadContribution(HtmlHeaderContainer container)
Let this handler print out the needed header contributions. |
protected void |
renderHeadInitContribution(HtmlHeaderContainer container)
Do a one time (per page) header contribution that is the same for all ajax variant implementations (e.g. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected IResourceStream resourceStream
| Constructor Detail |
public AjaxHandler()
| Method Detail |
public final java.lang.String getBodyOnload()
IBodyOnloadContributor
getBodyOnload in interface IBodyOnloadContributorIBodyOnloadContributor.getBodyOnload()public final void renderHead(HtmlHeaderContainer container)
IHeaderContributorNote: This method is kind of dangerous as users are able to write to the output whatever they like.
renderHead in interface IHeaderContributorcontainer - The HtmlHeaderContainerIHeaderContributor.renderHead(wicket.markup.html.HtmlHeaderContainer)public void onComponentTag(ComponentTag tag)
tag - the tag that is renderedpublic final java.lang.String getCallbackUrl()
protected abstract java.lang.String getImplementationId()
protected abstract IResourceStream getResponse()
protected void renderHeadInitContribution(HtmlHeaderContainer container)
container - head containerprotected void renderHeadContribution(HtmlHeaderContainer container)
container - head containerprotected final Component getComponent()
protected void onBind()
protected java.lang.String getBodyOnloadInitContribution()
protected java.lang.String getBodyOnloadContribution()
protected void onComponentRendered()
protected void configure(Response response,
IResourceStream resourceStream)
response - the responseresourceStream - the resource stream that will be renderedprotected java.lang.String getResponseType()
protected void addJsReference(HtmlHeaderContainer container,
PackageResourceReference ref)
container - the header containerref - reference to addfinal void bind(Component hostComponent)
hostComponent - the component to bind tofinal void internalOnComponentRendered()
final void onRequest()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||