It sounds like your code keeps adding the toolbar. Can you show us some code that adds your custom toolbar? It should only add the toolbar once, when the table is created.
// Bas Verstuurd vanaf mijn iPhone > Op 29 dec. 2016 om 09:53 heeft nino martinez wael > <nino.martinez.w...@gmail.com> het volgende geschreven: > > After looking into > https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/repeater/data/table/export/ExportToolbar.html > > I realised that it was using onInitialize() so I moved my code there > instead of the constructor.. But it made no change what so ever.. > > > > On Thu, Dec 29, 2016 at 9:37 AM, nino martinez wael < > nino.martinez.w...@gmail.com> wrote: > >> Hi >> >> I am having a little trouble, making my own toolbar. Currently on >> pagination change my toolbar are added, but the old toolbar are not removed >> / updated. So for every click on pagination, additional toolbars are added. >> >> Short story: >> User clicks page 2 on AjaxFallbackDefaultDataTable >> User now sees two delete buttons >> >> public abstract class SelectedListActionToolbar extends AbstractToolbar { >> >> public SelectedListActionToolbar(final IModel<HashMap<Integer, Site>> >> model, final DataTable<?, ?> table) >> { >> super(table); >> setOutputMarkupId(true); >> Link link=new Link("onAction"){ >> @Override >> public void onClick() { >> SelectedListActionToolbar.this.onClick(model); >> } >> }; >> add(link); >> >> >> } >> >> public abstract void onClick(final IModel<HashMap<Integer, Site>> >> model); >> >> >> <wicket:panel> >> <button wicket:id="onAction" type="button" class="btn >> btn-danger">Delete Selected</button> >> >> </wicket:panel> >> >> >> AjaxFallbackDefaultDataTable dataTable = getTable(); >> dataTable.addBottomToolbar(new >> SelectedListActionToolbar(selectedSites,dataTable) >> { >> @Override >> public void onClick(final IModel<HashMap<Integer, Site>> >> model) { >> //Delete the stuff! >> } >> }); >> >> add(dataTable); >> >> >> -- >> Best regards / Med venlig hilsen >> Nino Martinez >> > > > > -- > Best regards / Med venlig hilsen > Nino Martinez --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org