Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Message over table when empty

Oliv Mor
1 decade ago Feb 10, 2012 2:42pm
Oliv Mor
1 decade ago Feb 17, 2012 2:22pm


Well I've slightly improved to code, using filter features instead of create a new container...

public Example() {

table = new Table();
// The search textfield
filterBepTF = new TextField();
filterBepTF.addListener((TextChangeListener) this);


public void textChange(TextChangeEvent event)
		Filterable f = (Filterable) table.getContainerDataSource();

		String searchString = event.getText();
		if (searchString != null && searchString.trim().length() != 0)
			AbstractJunctionFilter filter = null;
			for (String part : searchString.trim().split(" "))
				if (filter != null)
					filter = new And(filter, new Or(new SimpleStringFilter(BrowserTable.PROPERTY_NAME, part, true, false), new SimpleStringFilter(
							BrowserTable.PROPERTY_KIND, part, true, false)));
					filter = new Or(new SimpleStringFilter(BrowserTable.PROPERTY_NAME, part, true, false), new SimpleStringFilter(BrowserTable.PROPERTY_KIND,
							part, true, false));


		if (table.getItemIds().isEmpty())


And the style.css:

.v-table-empty .v-table-body {
	background-image: url('no_result.png');
	background-repeat: no-repeat;
	background-position: center center;

Any feedback would be appreciate....

Last updated on Feb, 17th 2012
Mathias Clerc
1 decade ago Feb 20, 2012 4:29am
mrunal lohar
7 years ago Sep 06, 2015 4:11pm
Adam Jilling
6 years ago Jul 18, 2016 6:22pm
Nikolay Artamonov
6 years ago Apr 12, 2017 12:34pm