|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.navigation.paging.PagingNavigationIncrementLink<Void> org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationIncrementLink
public class AjaxPagingNavigationIncrementLink
An incremental Ajaxian link to a page of a PageableListView. Assuming your list view navigation looks like
[first / << / <] 1 | 2 | 3 [> / >> /last]
and "<" meaning the previous and "<<" goto the "current page - 5", than it is this kind of incremental page links which can easily be created. This link will update the pageable and itself or the navigator the link is part of using Ajax techniques, or perform a full refresh when ajax is not available.
Field Summary |
---|
Fields inherited from class org.apache.wicket.markup.html.navigation.paging.PagingNavigationIncrementLink |
---|
pageable |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Fields inherited from interface org.apache.wicket.markup.html.link.ILinkListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
AjaxPagingNavigationIncrementLink(String id,
IPageable pageable,
int increment)
Constructor. |
Method Summary | |
---|---|
protected String |
getEventHandler(String defaultHandler)
Deprecated. This method is not used since Wicket 6.0.0 |
protected AjaxPagingNavigationBehavior |
newAjaxPagingNavigationBehavior(IPageable pageable,
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. |
protected void |
updateAjaxAttributes(AjaxRequestAttributes attributes)
|
Methods inherited from class org.apache.wicket.markup.html.navigation.paging.PagingNavigationIncrementLink |
---|
getPageNumber, isFirst, isLast, linksTo |
Methods inherited from class org.apache.wicket.markup.html.link.Link |
---|
appendAnchor, getAnchor, getAutoEnable, getModel, getModelObject, 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, getBody, isLinkEnabled, onBeforeRender, onComponentTagBody, onDetach, setAfterDisabledLink, setBeforeDisabledLink, setBody |
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
---|
getWebPage, getWebRequest, getWebResponse, getWebSession |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AjaxPagingNavigationIncrementLink(String id, IPageable pageable, int increment)
id
- See Componentpageable
- The pageable component the page links are referring toincrement
- increment byMethod Detail |
---|
protected void onInitialize()
Component
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, String event)
pageable
- The pageable component the page links are referring toevent
- the name of the default event on which this link will listen to
protected void updateAjaxAttributes(AjaxRequestAttributes attributes)
@Deprecated protected String getEventHandler(String defaultHandler)
NOTE: It is recommended that you only prepend additional javascript to the default handler because the default handler uses the return func() format so any appended javascript will not be evaluated by default.
defaultHandler
- default javascript event handler generated by this link
public void onClick()
onClick
in class PagingNavigationIncrementLink<Void>
Link.onClick()
public void onClick(AjaxRequestTarget target)
onClick
in interface IAjaxLink
target
- the request target, when null
, a full page refresh will be generated
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |