Re: Dataview: need message nothing found
I tried this, but I can't figure out how to convert from datatable to an AbstractRepeater. DataTable table = new DataTable(datatable, columns, kostenOVProvider, 10){ protected Item newRowItem(String id, int index, IModel model) { Item item = super.newRowItem(id, index, model); item.add(new AttributeModifier(class, new Model( index % 2 == 0 ? even : odd))); return item; } }; FilterToolbar filterToolbar = new FilterToolbar(table, form, kostenOVProvider); table.addTopToolbar(new HeadersToolbar(table, kostenOVProvider)); table.addTopToolbar(filterToolbar); table.addBottomToolbar(new NavigationToolbar(table)); form.add(table); form.add(new NoRecordsContainer(norecordsFound, table)); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dataview-need-message-nothing-found-tp4651337p4651369.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: Dataview: need message nothing found
data table has the NoRecordsToolbar -igor On Mon, Aug 20, 2012 at 3:01 AM, Delange delan...@telfort.nl wrote: I tried this, but I can't figure out how to convert from datatable to an AbstractRepeater. DataTable table = new DataTable(datatable, columns, kostenOVProvider, 10){ protected Item newRowItem(String id, int index, IModel model) { Item item = super.newRowItem(id, index, model); item.add(new AttributeModifier(class, new Model( index % 2 == 0 ? even : odd))); return item; } }; FilterToolbar filterToolbar = new FilterToolbar(table, form, kostenOVProvider); table.addTopToolbar(new HeadersToolbar(table, kostenOVProvider)); table.addTopToolbar(filterToolbar); table.addBottomToolbar(new NavigationToolbar(table)); form.add(table); form.add(new NoRecordsContainer(norecordsFound, table)); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dataview-need-message-nothing-found-tp4651337p4651369.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Dataview: need message nothing found
Hi, when my dataview (with selections) does not return any result, it doesn't say anything. How can i return a message that there are no results found. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dataview-need-message-nothing-found-tp4651337.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: Dataview: need message nothing found
add a webmarkup container that is only visible when the dataview has no records. public class NoRecordsContainer extends WebMarkupContainer { private final AbstractRepeater repeater; public NoRecordsContainer(String id, AbstractRepeater repeater) { super(id); this.repeater = repeater; setOutputMarkupPlaceholderTag(true); } @Override protected void onConfigure() { super.onConfigure(); setVisible(repeater.size() == 0); } } -igor On Fri, Aug 17, 2012 at 8:00 AM, Delange delan...@telfort.nl wrote: Hi, when my dataview (with selections) does not return any result, it doesn't say anything. How can i return a message that there are no results found. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Dataview-need-message-nothing-found-tp4651337.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org