You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by midikem <an...@gmail.com> on 2011/10/27 13:00:31 UTC
popup to disapear on defaultdatatable paging
Hi i have a problem. I have a popup that triggers on a page. If it contains
pageparameter popup it should trigger. The problem is that i want it to
disapear on the defaultdatatable paging. Becouse now everytime i press
something in the paging the popup popsup. Is there a way to override the
paging so i could remove the pageparameter?
SortableDataProvider<Doc> provider = new
SortableDocumentProvider(wrappedDocumentList);
provider.setSort("bla", true);
add(new DefaultDataTable<Doc>("dataTable", columns, provider,
DEFAULT_PAGE_SIZE));
String onLoadScript = "";
if (parameters.containsKey("popup")) {
LOGGER.debug("Adding popup window script");
onLoadScript = "";
}
add(new Label("onLoadScript",
onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true));
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: popup to disapear on defaultdatatable paging
Posted by midikem <an...@gmail.com>.
Well i got it to work after a while when i realized PagingNavigator not was
the only one i could use. So when i switched to AjaxPagingNavigator i found
this method onAjaxEvent that did what i wanted it to. Have another question
about DataTable though. Is it possible to change the headersToolbar for the
provider that at the moment shows "Showing 9 to 9 of 9" would like to change
it to another language. Couldent find a method handling that.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3948016.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: popup to disapear on defaultdatatable paging
Posted by midikem <an...@gmail.com>.
I still got a problem. When i override onClick() and just try to logg
something out nothing happends.
@Override
protected PagingNavigationLink<?> newPagingNavigationLink(String id,
IPageable pageable, final int pageNumber) {
return new PagingNavigationLink(id, pageable, pageNumber) {
private static final long serialVersionUID = 1L;
@Override
public void onClick() {
LOGGER.info("Bla");
if (parameters.containsKey("popup")) {
parameters.remove("popup");
}
}
};
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3944415.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: popup to disapear on defaultdatatable paging
Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Oct 27, 2011 at 1:00 PM, midikem <an...@gmail.com> wrote:
> Hi i have a problem. I have a popup that triggers on a page. If it contains
> pageparameter popup it should trigger. The problem is that i want it to
> disapear on the defaultdatatable paging. Becouse now everytime i press
> something in the paging the popup popsup. Is there a way to override the
> paging so i could remove the pageparameter?
>
> SortableDataProvider<Doc> provider = new
> SortableDocumentProvider(wrappedDocumentList);
> provider.setSort("bla", true);
> add(new DefaultDataTable<Doc>("dataTable", columns, provider,
> DEFAULT_PAGE_SIZE));
>
> String onLoadScript = "";
> if (parameters.containsKey("popup")) {
> LOGGER.debug("Adding popup window script");
> onLoadScript = "";
> }
> add(new Label("onLoadScript",
> onLoadScript).setEscapeModelStrings(false).setOutputMarkupId(true));
Don't use DefaultDataTable but DataTable with explicitly specified
toolbars. This way you can extend the default PagingNavigator with
your own that removes the special parameter.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/popup-to-disapear-on-defaultdatatable-paging-tp3943946p3943946.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org