Class AjaxPagingNavigationLink

  extended by org.apache.wicket.Component
      extended by org.apache.wicket.MarkupContainer
          extended by org.apache.wicket.markup.html.WebMarkupContainer
              extended by
                  extended by<T>
                      extended by org.apache.wicket.markup.html.navigation.paging.PagingNavigationLink<java.lang.Void>
                          extended by org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationLink
All Implemented Interfaces:, java.lang.Iterable<Component>, IAjaxLink, IEventSink, IEventSource, IClusterable, IConverterLocator, IRequestListener, IHeaderContributor, ILinkListener, IRequestableComponent, IHierarchical<Component>

public class AjaxPagingNavigationLink
extends PagingNavigationLink<java.lang.Void>
implements IAjaxLink

An Ajax version of a link to a page of a PageableListView.

Martijn Dashorst
See Also:
Serialized Form

Field Summary
Fields inherited from class org.apache.wicket.markup.html.navigation.paging.PagingNavigationLink
Fields inherited from class org.apache.wicket.Component
Fields inherited from interface
Constructor Summary
AjaxPagingNavigationLink(java.lang.String id, IPageable pageable, int pageNumber)
Method Summary
protected  AjaxPagingNavigationBehavior newAjaxPagingNavigationBehavior(IPageable pageable, java.lang.String event)
 void onClick()
          Fallback event listener, will redisplay the current page.
 void onClick(AjaxRequestTarget target)
          Performs the actual action of this component, performing a non-ajax fallback when there was no AjaxRequestTarget available.
protected  void onInitialize()
          This method is meant to be used as an alternative to initialize components.
Methods inherited from class org.apache.wicket.markup.html.navigation.paging.PagingNavigationLink
cullPageNumber, getPageNumber, isFirst, isLast, linksTo
Methods inherited from class
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, getOnClickScript, getPopupSettings, getStatelessHint, getURL, isEnabled, onComponentTag, onLinkClicked, setAnchor, setAutoEnable, setModel, setModelObject, setPopupSettings
Methods inherited from class
disableLink, getAfterDisabledLink, getBeforeDisabledLink, getBody, isLinkEnabled, onBeforeRender, onComponentTagBody, onDetach, setAfterDisabledLink, setBeforeDisabledLink, setBody
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebPage, getWebRequest
Methods inherited from class org.apache.wicket.MarkupContainer
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, 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, getFeedbackMessage, getFeedbackMessages, getFlag, getId, 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, getSizeInBytes, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onConfigure, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, 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, warn, wrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public AjaxPagingNavigationLink(java.lang.String id,
                                IPageable pageable,
                                int pageNumber)

id - See Component
pageable - The pageable component for this page link
pageNumber - The page number in the PageableListView that this link links to. Negative pageNumbers are relative to the end of the list.
Method Detail


protected void onInitialize()
Description copied from class: Component
This method is meant to be used as an alternative to initialize components. Usually the component's constructor is used for this task, but sometimes a component cannot be initialized in isolation, it may need to access its parent component or its markup in order to fully initialize. This method is invoked once per component's lifecycle when a path exists from this component to the Page thus providing the component with an atomic callback when the component's environment is built out.

Overrides must call super#Component.onInitialize(). Usually this should be the first thing an override does, much like a constructor.

Parent containers are guaranteed to be initialized before their children

It is safe to use Component.getPage() in this method

NOTE:The timing of this call is not precise, the contract is that it is called sometime before Component.onBeforeRender().

onInitialize in class Component


protected AjaxPagingNavigationBehavior newAjaxPagingNavigationBehavior(IPageable pageable,
                                                                       java.lang.String event)
pageable - The pageable component the page links are referring to
event - the name of the default event on which this link will listen to
the ajax behavior which will be executed when the user clicks the link


public void onClick()
Fallback event listener, will redisplay the current page.

onClick in class PagingNavigationLink<java.lang.Void>
See Also:


public void onClick(AjaxRequestTarget target)
Performs the actual action of this component, performing a non-ajax fallback when there was no AjaxRequestTarget available.

Specified by:
onClick in interface IAjaxLink
target - the request target, when null, a full page refresh will be generated

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