im new in java component base framework, especially vaadin. before use this framework, im using struts 2.
so when i want to query some table, i have a search box, contains many textfield. when user click Search Button, then the parameters from the texfield will be sent into my hibernate directly using http post.
my question, how to filter the output using vaadin?
Just update your BeanContainer with new data. Here is an example of my code
public void refreshTableData() {
getBeanContainer().removeAllItems();
List<Customer> customers = customerDao.getByCustomerFilter(getCustomerFilterForm().getFilterItem().getBean());
getBeanContainer().addAll(customers);
}
Where CustomerFilter is a bean that has all the search criteria data, that I fill it within a form earlier (e.g with comboboxes), and beanContainer is my table container data source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With