ontopoly.components
Class AbstractBookmarkablePageLink<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 ontopoly.components.AbstractBookmarkablePageLink<T>
All Implemented Interfaces:
java.io.Serializable, org.apache.wicket.IClusterable, org.apache.wicket.IConverterLocator, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.link.ILinkListener
Direct Known Subclasses:
TopicLink

public abstract class AbstractBookmarkablePageLink<T>
extends org.apache.wicket.markup.html.link.Link<T>

HACK: Had to make a copy of org.apache.wicket.markup.html.link.BookmarkablePageLink because the getPageClass() method was final.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Component
org.apache.wicket.Component.ComponentModelChange, org.apache.wicket.Component.EnabledChange, org.apache.wicket.Component.IVisitor<T extends org.apache.wicket.Component>, org.apache.wicket.Component.VisibilityChange
 
Field Summary
protected  java.lang.String pageClassName
          The page class that this link links to.
protected  org.apache.wicket.util.collections.MiniMap<java.lang.String,java.lang.Object> parameters
          The parameters to pass to the class constructor when instantiated.
 
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER
 
Fields inherited from interface org.apache.wicket.markup.html.link.ILinkListener
INTERFACE
 
Constructor Summary
AbstractBookmarkablePageLink(java.lang.String id)
           
AbstractBookmarkablePageLink(java.lang.String id, java.lang.Class<C> pageClass)
          Constructor.
AbstractBookmarkablePageLink(java.lang.String id, java.lang.Class<C> pageClass, org.apache.wicket.PageParameters parameters)
          Constructor.
 
Method Summary
abstract  java.lang.Class<? extends org.apache.wicket.Page> getPageClass()
          Get tge page class registered with the link
 org.apache.wicket.PageParameters getPageParameters()
           
protected  boolean getStatelessHint()
           
protected  java.lang.CharSequence getURL()
          Gets the url to use for this link.
 boolean linksTo(org.apache.wicket.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.
 AbstractBookmarkablePageLink<T> setParameter(java.lang.String property, int value)
          Adds a given page property value to this link.
 AbstractBookmarkablePageLink<T> setParameter(java.lang.String property, long value)
          Adds a given page property value to this link.
 AbstractBookmarkablePageLink<T> setParameter(java.lang.String property, java.lang.String value)
          Adds a given page property value to this link.
 
Methods inherited from class org.apache.wicket.markup.html.link.Link
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, getOnClickScript, getOnClickScript, getPopupSettings, 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, 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, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, 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, onDetach, onEndRequest, 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
 

Field Detail

pageClassName

protected final java.lang.String pageClassName
The page class that this link links to.


parameters

protected org.apache.wicket.util.collections.MiniMap<java.lang.String,java.lang.Object> parameters
The parameters to pass to the class constructor when instantiated.

Constructor Detail

AbstractBookmarkablePageLink

public AbstractBookmarkablePageLink(java.lang.String id,
                                    java.lang.Class<C> pageClass)
Constructor.

Type Parameters:
C - type of page
Parameters:
id - The name of this component
pageClass - The class of page to link to

AbstractBookmarkablePageLink

public AbstractBookmarkablePageLink(java.lang.String id)

AbstractBookmarkablePageLink

public AbstractBookmarkablePageLink(java.lang.String id,
                                    java.lang.Class<C> pageClass,
                                    org.apache.wicket.PageParameters parameters)
Constructor.

Type Parameters:
C -
Parameters:
id - See Component
pageClass - The class of page to link to
parameters - The parameters to pass to the new page when the link is clicked
Method Detail

getPageParameters

public org.apache.wicket.PageParameters getPageParameters()
Returns:
page parameters

getPageClass

public abstract java.lang.Class<? extends org.apache.wicket.Page> getPageClass()
Get tge page class registered with the link

Returns:
Page class

linksTo

public boolean linksTo(org.apache.wicket.Page page)
Whether this link refers to the given page.

Overrides:
linksTo in class org.apache.wicket.markup.html.link.Link<T>
Parameters:
page - the page
See Also:
Link.linksTo(org.apache.wicket.Page)

getStatelessHint

protected boolean getStatelessHint()
Overrides:
getStatelessHint in class org.apache.wicket.markup.html.link.Link<T>

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 class org.apache.wicket.markup.html.link.Link<T>
See Also:
Link.onClick()

setParameter

public AbstractBookmarkablePageLink<T> setParameter(java.lang.String property,
                                                    int value)
Adds a given page property value to this link.

Parameters:
property - The property
value - The value
Returns:
This

setParameter

public AbstractBookmarkablePageLink<T> setParameter(java.lang.String property,
                                                    long value)
Adds a given page property value to this link.

Parameters:
property - The property
value - The value
Returns:
This

setParameter

public AbstractBookmarkablePageLink<T> setParameter(java.lang.String property,
                                                    java.lang.String value)
Adds a given page property value to this link.

Parameters:
property - The property
value - The value
Returns:
This

getURL

protected java.lang.CharSequence getURL()
Gets the url to use for this link.

Overrides:
getURL in class org.apache.wicket.markup.html.link.Link<T>
Returns:
The URL that this link links to
See Also:
Link.getURL()


Copyright © 2000-2012 Ontopia.