public abstract class AsyncUrlFragmentAwarePage extends org.apache.wicket.markup.html.WebPage implements IBookmarkableComponent
WebPage
which will receive the URL query and fragment parameters asynchronously
after the initial request.
After the initial request this page executes an AJAX call (through a behavior) which invokes
onParameterArrival(IRequestParameters, AjaxRequestTarget)
. This is a typical AJAX event
handling method with the difference that you have the URL query and fragment parameters, your
site was requested with, available in it. This method serves as your entry point for components
depending on URL fragment parameters.
Be aware the this page will be rendered on the initial request in order to make the AJAX call. This means, that, before the fragment parameters arrive, your implementation has to have initial state (models) and content and cannot be invisible.
Modifier and Type | Field and Description |
---|---|
protected UrlParametersReceivingBehavior |
urlParametersReceivingBehavior |
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING
Constructor and Description |
---|
AsyncUrlFragmentAwarePage() |
AsyncUrlFragmentAwarePage(org.apache.wicket.model.IModel<?> model) |
AsyncUrlFragmentAwarePage(org.apache.wicket.request.mapper.parameter.PageParameters parameters) |
Modifier and Type | Method and Description |
---|---|
void |
addFragmentParameter(String parameterName,
Object parameterValue,
String delimiter)
Deprecated.
|
protected Map<String,String> |
getOptions()
Returns a map of options used for initializing the JavaScript library for reading and writing
the URL fragment.
|
protected void |
onInitialize() |
protected abstract void |
onParameterArrival(org.apache.wicket.request.IRequestParameters requestParameters,
org.apache.wicket.ajax.AjaxRequestTarget target)
This is where you can grab the URL query and fragment parameters, your site was requested
with.
|
void |
removeFragmentParameter(String parameterName)
Deprecated.
|
void |
renderHead(org.apache.wicket.markup.head.IHeaderResponse response) |
void |
setFragmentParameter(String parameterName,
Object parameterValue)
Deprecated.
|
protected UrlFragment |
urlFragment()
Returns a
UrlFragment connected to the current AjaxRequestTarget . |
configureResponse, getMarkupType, homePageLink, onAfterRender, onRender, renderXmlDecl, reportMissingHead, setHeaders, setNextAvailableId
componentChanged, componentRendered, detachModels, dirty, dirty, endComponentRender, getAutoIndex, getId, getPageClass, getPageId, getPageParameters, getPageReference, getRenderCount, getSizeInBytes, getStatelessHint, hierarchyAsString, internalOnModelChanged, internalPrepareForRender, isBookmarkable, isErrorPage, isPageStateless, onBeforeRender, onDetach, renderPage, setFreezePageId, setNumericId, setStatelessHint, setWasCreatedBookmarkable, startComponentRender, toString, wasCreatedBookmarkable, wasRendered
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected UrlParametersReceivingBehavior urlParametersReceivingBehavior
public AsyncUrlFragmentAwarePage()
public AsyncUrlFragmentAwarePage(org.apache.wicket.model.IModel<?> model)
public AsyncUrlFragmentAwarePage(org.apache.wicket.request.mapper.parameter.PageParameters parameters)
protected void onInitialize()
onInitialize
in class org.apache.wicket.Page
protected Map<String,String> getOptions()
Possible options are:
protected abstract void onParameterArrival(org.apache.wicket.request.IRequestParameters requestParameters, org.apache.wicket.ajax.AjaxRequestTarget target)
urlFragment()
inside this method.requestParameters
- target
- @Deprecated public void setFragmentParameter(String parameterName, Object parameterValue)
IBookmarkableComponent
AjaxRequestTarget
.
The parameter will be overwritten if it already exists.
setFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setparameterValue
- the value of your URL fragment parameter to set@Deprecated public void addFragmentParameter(String parameterName, Object parameterValue, String delimiter)
IBookmarkableComponent
Use the following instead:
urlFragment().addParameter(parameterName, parameterValue, delimiter);
AjaxRequestTarget
.
The parameter will be created if it doesn't exists yet.
The value will be appended with the specified delimiter if the parameter already exists.
addFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setparameterValue
- the value of your URL fragment parameter to setdelimiter
- the delimiter the given value will be appended with if the given parameter already
exists@Deprecated public void removeFragmentParameter(String parameterName)
IBookmarkableComponent
Use the following instead: urlFragment().removeParameter(parameterName);
AjaxRequestTarget
.removeFragmentParameter
in interface IBookmarkableComponent
parameterName
- the name of your URL fragment parameter to setprotected UrlFragment urlFragment()
UrlFragment
connected to the current AjaxRequestTarget
. Use the
UrlFragment
to update the URL fragment in the browser after the current AJAX event.public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
renderHead
in interface org.apache.wicket.markup.html.IHeaderContributor
renderHead
in class org.apache.wicket.Component
Copyright © 2015. All rights reserved.