org.apache.wicket.markup.html.link
Class PageLink<T>

java.lang.Object
  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by org.apache.wicket.markup.html.link.AbstractLink
                  extended by org.apache.wicket.markup.html.link.Link<T>
                      extended by org.apache.wicket.markup.html.link.PageLink<T>
Type Parameters:
T - type of model object
All Implemented Interfaces:
Serializable, IClusterable, IConverterLocator, IRequestListener, ILinkListener

Deprecated. use BookmarkablePageLink or Link instead

@Deprecated
public class PageLink<T>
extends Link<T>

Links to a given page via an object implementing the IPageLink delayed linking interface. PageLinks can be constructed directly with an IPageLink interface or with a Page Class object. In the latter case, an IPageLink implementation is provided which constructs a Page of the given class when the link is clicked. A default no-args constructor must be available in this case or a WicketRuntimeException will be thrown when Wicket fails to instantiate the class. TODO 1.5: remove

Author:
Jonathan Locke
See Also:
IPageLink, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange
 
Field Summary
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER
 
Fields inherited from interface org.apache.wicket.markup.html.link.ILinkListener
INTERFACE
 
Constructor Summary
PageLink(String id, Class<C> c)
          Deprecated. Constructs a link that instantiates the given Page class when the link is clicked.
PageLink(String id, IPageLink pageLink)
          Deprecated. This constructor is ideal for constructing pages lazily.
PageLink(String id, Page page)
          Deprecated. rather than using this class/ constructor, use normal links and call setResponsePage in their onClick methods.
 
Method Summary
 Class<? extends Page> getPageClass()
          Deprecated. Retrieves the class of page this link links to.
 boolean linksTo(Page page)
          Deprecated. Returns true if the given page is of the same class as the (delayed) destination of this page link.
 void onClick()
          Deprecated. Handles a link click by asking for a concrete Page instance through the IPageLink.getPage() delayed linking interface.
 
Methods inherited from class org.apache.wicket.markup.html.link.Link
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, getOnClickScript, getOnClickScript, getPopupSettings, getStatelessHint, getURL, isEnabled, onComponentTag, onLinkClicked, setAnchor, setAutoEnable, setModel, setModelObject, setPopupSettings
 
Methods inherited from class org.apache.wicket.markup.html.link.AbstractLink
disableLink, getAfterDisabledLink, getBeforeDisabledLink, isLinkEnabled, onBeforeRender, onComponentTagBody, setAfterDisabledLink, setBeforeDisabledLink
 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getMarkupType, getWebPage, getWebRequest
 
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
 
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeginRequest, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageLink

public PageLink(String id,
                Class<C> c)
Deprecated. 
Constructs a link that instantiates the given Page class when the link is clicked. The instantiated Page is used to render a response to the user.

Type Parameters:
C -
Parameters:
id - See Component
c - Page class

PageLink

public PageLink(String id,
                IPageLink pageLink)
Deprecated. 
This constructor is ideal for constructing pages lazily. Constructs a link which invokes the getPage() method of the IPageLink interface when the link is clicked. Whatever Page objects is returned by this method will be rendered back to the user.

Parameters:
id - See Component
pageLink - An implementation of IPageLink which will create the page linked to if and when this hyperlink is clicked at a later time.

PageLink

@Deprecated
public PageLink(String id,
                           Page page)
Deprecated. rather than using this class/ constructor, use normal links and call setResponsePage in their onClick methods.

This constructor is ideal if a Page object was passed in from a previous Page. Construct a link to the Page. Warning: DO NOT use this for constructing links to pages you didn't already have an instance of. This constructor is strongly discouraged for anything other than linking back to the same page.

Parameters:
id - See component
page - The page
Method Detail

getPageClass

public Class<? extends Page> getPageClass()
Deprecated. 
Retrieves the class of page this link links to.

Returns:
page of class

linksTo

public boolean linksTo(Page page)
Deprecated. 
Returns true if the given page is of the same class as the (delayed) destination of this page link.

Overrides:
linksTo in class Link<T>
Parameters:
page - A page
Returns:
True if this link goes to the given page
See Also:
Link.linksTo(org.apache.wicket.Page)

onClick

public void onClick()
Deprecated. 
Handles a link click by asking for a concrete Page instance through the IPageLink.getPage() delayed linking interface. This call will normally cause the destination page to be created.

Specified by:
onClick in class Link<T>
See Also:
Link.onClick()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.