Reputation: 292
I am using a Vaadin table to display some reprts. While my submit button is working, if I click again it's showing the same data multiple times (duplicates). My code is
Button executeSearchButton = new Button("Search");
executeSearchButton.addListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
if(caseId != null || sitename != null || menunames != null )
runSerachPage(searchTable, caseId.getValue().toString(), sitename.getValue().toString(), menunames);
}
});
Upvotes: 2
Views: 217
Reputation: 24184
Looks like you doesn't clear table before inserting new records. I assume that you should have something like table.removeAllItems() in runSerachPage before adding new items.
Upvotes: 1