List of usage examples for org.apache.wicket.ajax.markup.html.navigation.paging AjaxPagingNavigationIncrementLink AjaxPagingNavigationIncrementLink
public AjaxPagingNavigationIncrementLink(final String id, final IPageable pageable, final int increment)
From source file:au.org.theark.core.web.component.navigator.ArkAjaxPagingNavigator.java
License:Open Source License
@Override protected Link<?> newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { AjaxPagingNavigationIncrementLink link = new AjaxPagingNavigationIncrementLink(id, pageable, increment) { private static final long serialVersionUID = 1L; @Override/*from www . j a v a 2s. com*/ protected void onInitialize() { super.onInitialize(); add(new AjaxPagingNavigationBehavior(this, pageable, "onclick") { /** * */ private static final long serialVersionUID = 1L; @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String onClickEvent = tag.getAttribute("onclick"); if (onClickEvent != null) { tag.put("onclick", dirtyFormJavaScript(onClickEvent)); } } }); } }; return link; }
From source file:com.schat.components.paging.bootstrap.BootstrapPagingNavigator.java
License:Apache License
@Override protected AbstractLink newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { ExternalLink navCont = new ExternalLink(id + "Cont", (String) null); // add css for enable/disable link long pageIndex = pageable.getCurrentPage() + increment; //navCont.add(new AttributeModifier("class", new NavigationIncrementLinkCssModel(pageable, pageIndex))); // change original wicket-link, so that it always generates href navCont.add(new AjaxPagingNavigationIncrementLink(id, pageable, increment) { @Override//w ww . j ava 2s. c o m protected void disableLink(ComponentTag tag) { } }); return navCont; }
From source file:com.servoy.j2db.server.headlessclient.dataui.ServoyAjaxPagingNavigator.java
License:Open Source License
/** * @see wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator#newPagingNavigationIncrementLink(java.lang.String, wicket.markup.html.navigation.paging.IPageable, int) *//* www .j a va 2 s.c o m*/ @Override protected Link newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { Link rez = new AjaxPagingNavigationIncrementLink(id, pageable, increment) { private static final long serialVersionUID = 1L; /** * @see wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationIncrementLink#onClick(wicket.ajax.AjaxRequestTarget) */ @Override public void onClick(AjaxRequestTarget target) { super.onClick(target); Page page = findPage(); if (page != null) { WebEventExecutor.generateResponse(target, page); } else throw new AbortException(); } }; TabIndexHelper.setUpTabIndexAttributeModifier(rez, tabIndex); return rez; }
From source file:org.cyclop.web.components.pagination.BootstrapPagingNavigator.java
License:Apache License
@Override protected AbstractLink newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { ExternalLink navCont = new ExternalLink(id + "Cont", (String) null); // add css for enable/disable link long pageIndex = pageable.getCurrentPage() + increment; navCont.add(new AttributeModifier("class", new NavigationIncrementLinkCssModel(pageable, pageIndex))); // change original wicket-link, so that it always generates href navCont.add(new AjaxPagingNavigationIncrementLink(id, pageable, increment) { @Override//from www . j a v a 2s . c o m protected void disableLink(ComponentTag tag) { } }); return navCont; }
From source file:org.sakaiproject.sitestats.tool.wicket.components.SakaiPagingNavigator.java
License:Educational Community License
/** * Create a new increment link. May be subclassed to make use of specialized links, e.g. Ajaxian * links./*from ww w. ja va 2 s. c om*/ * * @param id * the link id * @param pageable * the pageable to control * @param increment * the increment * @return the increment link */ protected Link newPagingNavigationIncrementLink(String id, IPageable pageable, int increment) { return new AjaxPagingNavigationIncrementLink(id, pageable, increment); }