Class BookmarkablePageLink<T>
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.link.AbstractLink
-
- org.apache.wicket.markup.html.link.Link<T>
-
- org.apache.wicket.markup.html.link.BookmarkablePageLink<T>
-
- Type Parameters:
T
- type of model object, if any
- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IGenericComponent<T,Link<T>>
,IMetadataContext<Serializable,Component>
,IRequestListener
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
- Direct Known Subclasses:
AutoLinkResolver.AutolinkBookmarkablePageLink
public class BookmarkablePageLink<T> extends Link<T>
Renders a stable link which can be cached in a web browser and used at a later time.- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PageParameters
parameters
The parameters to pass to the class constructor when instantiated.-
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Constructor Summary
Constructors Constructor Description BookmarkablePageLink(String id, Class<C> pageClass)
Constructor.BookmarkablePageLink(String id, Class<C> pageClass, PageParameters parameters)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends Page>
getPageClass()
Get the page class registered with the linkPageParameters
getPageParameters()
protected boolean
getStatelessHint()
Returns whether the component can be stateless.protected CharSequence
getURL()
Gets the url to use for this link.boolean
linksTo(Page page)
Whether this link refers to the given page.void
onClick()
THIS METHOD IS NOT USED! Bookmarkable links do not have a click handler.-
Methods inherited from class org.apache.wicket.markup.html.link.Link
appendAnchor, getAnchor, getAutoEnable, getOnClickScript, getPopupSettings, isEnabled, onComponentTag, onRequest, renderHead, setAnchor, setAutoEnable, setPopupSettings, useJSEventBindingWhenNeeded
-
Methods inherited from class org.apache.wicket.markup.html.link.AbstractLink
disableLink, getBody, onComponentTagBody, onDetach, setBody
-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMarkupTag, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.IGenericComponent
getDefaultModel, getDefaultModelObject, getModel, getModelObject, setDefaultModel, setDefaultModelObject, setModel, setModelObject
-
Methods inherited from interface org.apache.wicket.IRequestListener
rendersPage
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
parameters
protected PageParameters parameters
The parameters to pass to the class constructor when instantiated.
-
-
Constructor Detail
-
BookmarkablePageLink
public BookmarkablePageLink(String id, Class<C> pageClass)
Constructor.- Type Parameters:
C
- type of page- Parameters:
id
- The name of this componentpageClass
- The class of page to link to
-
BookmarkablePageLink
public BookmarkablePageLink(String id, Class<C> pageClass, PageParameters parameters)
Constructor.- Type Parameters:
C
-- Parameters:
id
- See ComponentpageClass
- The class of page to link toparameters
- The parameters to pass to the new page when the link is clicked
-
-
Method Detail
-
getPageParameters
public PageParameters getPageParameters()
- Returns:
- page parameters
-
getPageClass
public final Class<? extends Page> getPageClass()
Get the page class registered with the link- Returns:
- Page class
-
linksTo
public boolean linksTo(Page page)
Whether this link refers to the given page.- Overrides:
linksTo
in classLink<T>
- Parameters:
page
- the page- Returns:
- True if this link goes to the given page
- See Also:
Link.linksTo(org.apache.wicket.Page)
-
getStatelessHint
protected boolean getStatelessHint()
Description copied from class:Component
Returns whether the component can be stateless. Also the component behaviors must be stateless, otherwise the component will be treat as stateful. In order for page to be stateless (and not to be stored in session), all components (and component behaviors) must be stateless.- Overrides:
getStatelessHint
in classLink<T>
- Returns:
- whether the component can be stateless
- See Also:
Component.getStatelessHint()
-
onClick
public final void onClick()
THIS METHOD IS NOT USED! Bookmarkable links do not have a click handler. It is here to satisfy the interface only, as bookmarkable links will be dispatched by the handling servlet.- Specified by:
onClick
in classLink<T>
- See Also:
Link.onClick()
-
getURL
protected CharSequence getURL()
Gets the url to use for this link.- Overrides:
getURL
in classLink<T>
- Returns:
- The URL that this link links to
- See Also:
Link.getURL()
-
-