Changing output of ListView, when the list is empty?
Hello Wickets, Does anyone know can I change the output of a listView when the included list is empty? It would be nice for example, when the list is empty, to show a message type Sorry, no results. Best, Jerry
Re: Changing output of ListView, when the list is empty?
You can have: add(listview = listview(...) { // Show list only if it has stuff isvisible() { return !getList().isEmpty(); } } add(label(..., Sorry, no results) { // Show label only if list is empty isvisible() { return listview.getList().isEmpty(); } } ** Martin 2009/12/30 Jerouris jerou...@gmail.com: Hello Wickets, Does anyone know can I change the output of a listView when the included list is empty? It would be nice for example, when the list is empty, to show a message type Sorry, no results. Best, Jerry - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Changing output of ListView, when the list is empty?
Thanks Martin, It's a nice idea to create a panel with these to components. Jerry 2009/12/30 Martin Makundi martin.maku...@koodaripalvelut.com You can have: add(listview = listview(...) { // Show list only if it has stuff isvisible() { return !getList().isEmpty(); } } add(label(..., Sorry, no results) { // Show label only if list is empty isvisible() { return listview.getList().isEmpty(); } } ** Martin 2009/12/30 Jerouris jerou...@gmail.com: Hello Wickets, Does anyone know can I change the output of a listView when the included list is empty? It would be nice for example, when the list is empty, to show a message type Sorry, no results. Best, Jerry - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org