Re: Dataview: need message nothing found

2012-08-20 Thread Igor Vaynberg
data table has the NoRecordsToolbar

-igor

On Mon, Aug 20, 2012 at 3:01 AM, Delange  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



Re: Dataview: need message nothing found

2012-08-20 Thread Delange
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

2012-08-17 Thread Igor Vaynberg
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  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



Dataview: need message nothing found

2012-08-17 Thread Delange
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