Re: Page navigation multiple click events put in queue...
You need to override org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationIncrementLink#updateAjaxAttributes and/or org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigationLink#updateAjaxAttributes Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Aug 5, 2014 at 12:01 PM, dharmendra pandey < dharmendra.pan...@gmail.com> wrote: > Hi Martin, > > Looking for means...I don't know where to override updateAjaxAttributes > method because AjaxFallbackDefaultDataTable has PaginationtoolBar and we > want to protect our application from user double click on pagination links. > > So it would be highly appreciated if you help me and suggest where to put > updateAjaxAttributes method.So that our user application will be protected > from double click exception on pagination clicked twice or more. > > Please suggest in above mentioned example... > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666873.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Page navigation multiple click events put in queue...
Hi Martin, Looking for means...I don't know where to override updateAjaxAttributes method because AjaxFallbackDefaultDataTable has PaginationtoolBar and we want to protect our application from user double click on pagination links. So it would be highly appreciated if you help me and suggest where to put updateAjaxAttributes method.So that our user application will be protected from double click exception on pagination clicked twice or more. Please suggest in above mentioned example... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666873.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page navigation multiple click events put in queue...
On Tue, Aug 5, 2014 at 11:15 AM, dharmendra pandey < dharmendra.pan...@gmail.com> wrote: > Hi Martin, > > Thanks for quick response, > > Yes I mentioned earlier with Type.ACTIVE. I am looking for Type.DROP or > Type.ACTIVE. > I am not sure what you mean by "I am looking for ...". Is there a question here ? > > Regards > Dharmendra Pandey > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666870.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Page navigation multiple click events put in queue...
Hi Martin, Thanks for quick response, Yes I mentioned earlier with Type.ACTIVE. I am looking for Type.DROP or Type.ACTIVE. Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666870.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page navigation multiple click events put in queue...
On Tue, Aug 5, 2014 at 10:03 AM, dharmendra pandey < dharmendra.pan...@gmail.com> wrote: > Hi, > > Thanks for your support, I am new to Wicket framework. > Using the custom page navigation api for capturing the event to drop here, > In BlockLinkEvent could you please suggest how I can use/call > updateAjaxAttributes method . > There is no need your code to call it. Wicket will call it. > > table = new LabTestPageNavigation(tableId, columns, > dataProvider, tableRows); > table.addBottomToolbar(new BlockLinkEvent(table)); > > > > @SuppressWarnings({ "serial", "rawtypes" }) > public class LabTestPageNavigation extends AjaxFallbackDefaultDataTable > { > > @SuppressWarnings("unchecked") > public LabTestPageNavigation(final String id, final List IColumn> columns, final ISortableDataProvider dataProvider, > final int rowsPerPage) { > super(id, columns, dataProvider, rowsPerPage); > setOutputMarkupId(true); > setVersioned(false); > addTopToolbar(new BlockLinkEvent(this)); > addTopToolbar(new AjaxFallbackHeadersToolbar(this, dataProvider)); > addBottomToolbar(new NoRecordsToolbar(this)); > } > > private class BlockLinkEvent extends NavigationToolbar { > > public BlockLinkEvent(DataTable table) { > super(table); > } > > @Override > protected PagingNavigator newPagingNavigator(final String > navigatorId, final DataTable table) { > return new AjaxPagingNavigator(navigatorId, table) { > > private static final long serialVersionUID = 1L; > > @Override > protected void onAjaxEvent(final AjaxRequestTarget target) > { > target.add(table); > } > > @Override > protected void onConfigure() { > // TODO Auto-generated method stub > super.onConfigure(); > > } > > @Override > protected void updateAjaxAttributes(AjaxRequestAttributes > attributes) { > super.updateAjaxAttributes(attributes); > System.out.println("Hello world! > > updateAjaxAttributes-"); > attributes.setChannel(new AjaxChannel("myChannel", > AjaxChannel.Type.DROP)); > I think you want Type.ACTIVE here, as in your first message. > } > }; > } > > } > } > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666867.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Page navigation multiple click events put in queue...
Hi, Thanks for your support, I am new to Wicket framework. Using the custom page navigation api for capturing the event to drop here, In BlockLinkEvent could you please suggest how I can use/call updateAjaxAttributes method . table = new LabTestPageNavigation(tableId, columns, dataProvider, tableRows); table.addBottomToolbar(new BlockLinkEvent(table)); @SuppressWarnings({ "serial", "rawtypes" }) public class LabTestPageNavigation extends AjaxFallbackDefaultDataTable { @SuppressWarnings("unchecked") public LabTestPageNavigation(final String id, final List> columns, final ISortableDataProvider dataProvider, final int rowsPerPage) { super(id, columns, dataProvider, rowsPerPage); setOutputMarkupId(true); setVersioned(false); addTopToolbar(new BlockLinkEvent(this)); addTopToolbar(new AjaxFallbackHeadersToolbar(this, dataProvider)); addBottomToolbar(new NoRecordsToolbar(this)); } private class BlockLinkEvent extends NavigationToolbar { public BlockLinkEvent(DataTable table) { super(table); } @Override protected PagingNavigator newPagingNavigator(final String navigatorId, final DataTable table) { return new AjaxPagingNavigator(navigatorId, table) { private static final long serialVersionUID = 1L; @Override protected void onAjaxEvent(final AjaxRequestTarget target) { target.add(table); } @Override protected void onConfigure() { // TODO Auto-generated method stub super.onConfigure(); } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); System.out.println("Hello world! updateAjaxAttributes-"); attributes.setChannel(new AjaxChannel("myChannel", AjaxChannel.Type.DROP)); } }; } } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666867.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page navigation multiple click events put in queue...
Please read my response from yesterday. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Aug 5, 2014 at 9:06 AM, dharmendra pandey < dharmendra.pan...@gmail.com> wrote: > I want to DROP/BLOCK the request when user clicking multiple time on last > page link > > Now I want to DROP/BLOCK the request if the earlier request is already on > progress.. > I am using the Wicket AjaxFallbackDefaultDataTable to render the table > data. > > I just want to know how I can block/drop the request click on last page of > page link similar to below.. > > created a class and extended with NavigationToolbar and now want to drop > the > request on last page click. > > I know that below method I have to use to drop the request but unable to > use > this method. > > @Override > protected void onAjaxEvent(final AjaxRequestTarget target) > { > target.add(table); > attributes.setChannel(new AjaxChannel("blocking", > AjaxChannel.Type.DROP)); > > } > > > Please suggest, > Regards > Dharmendra Pandey > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666865.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Page navigation multiple click events put in queue...
I want to DROP/BLOCK the request when user clicking multiple time on last page link Now I want to DROP/BLOCK the request if the earlier request is already on progress.. I am using the Wicket AjaxFallbackDefaultDataTable to render the table data. I just want to know how I can block/drop the request click on last page of page link similar to below.. created a class and extended with NavigationToolbar and now want to drop the request on last page click. I know that below method I have to use to drop the request but unable to use this method. @Override protected void onAjaxEvent(final AjaxRequestTarget target) { target.add(table); attributes.setChannel(new AjaxChannel("blocking", AjaxChannel.Type.DROP)); } Please suggest, Regards Dharmendra Pandey -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862p4666865.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Page navigation multiple click events put in queue...
Hi, On Mon, Aug 4, 2014 at 5:26 PM, dharmendra pandey < dharmendra.pan...@gmail.com> wrote: > Hi, > > We want to block/queue the multiple click event on page navigation link > when > user already clicked on some link, We have written our implementation via > extending NavigationToolbar and want to add the event to blocking queue. > > Please see the implementation below... > > @SuppressWarnings({ "serial", "rawtypes" }) > public class LabTestPageNavigation extends AjaxFallbackDefaultDataTable > { > > @SuppressWarnings("unchecked") > public LabTestPageNavigation(final String id, final List IColumn> columns, final ISortableDataProvider dataProvider, > final int rowsPerPage) { > super(id, columns, dataProvider, rowsPerPage); > setOutputMarkupId(true); > setVersioned(false); > addTopToolbar(new BlockLinkEvent(this)); > addTopToolbar(new AjaxFallbackHeadersToolbar(this, dataProvider)); > addBottomToolbar(new NoRecordsToolbar(this)); > } > > > > private class BlockLinkEvent extends NavigationToolbar { > > public BlockLinkEvent(DataTable table) { > super(table); > } > > @Override > protected PagingNavigator newPagingNavigator(final String > navigatorId, final DataTable table) { > return new AjaxPagingNavigator(navigatorId, table) { > > private static final long serialVersionUID = 1L; > > > @Override > protected void onAjaxEvent(final AjaxRequestTarget target) > { > target.add(table); > attributes.setChannel(new AjaxChannel("blocking", > What is "attributes" in this context ?! You should override #updateAjaxAttributes(AjaxRequestAttributes attributes) to configure the Ajax call for this component. > AjaxChannel.Type.ACTIVE)); > > } > }; > } > } > > } > > > > Please suggest. > > Regards > dharmendra pandey > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Page-navigation-multiple-click-events-put-in-queue-tp4666862.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >