alejandro-du / crudui

Automatically generate CRUD-like Vaadin views for any Java Bean
https://vaadin.com/directory#!addon/crud-ui-add-on
Apache License 2.0
85 stars 52 forks source link

isEmpty method #30

Closed ekomrak closed 5 years ago

ekomrak commented 6 years ago

Could you add the following method to the GridCrud class?

public boolean isEmpty() {
    return CollectionUtils.isEmpty(items);
}

It will be very usefull method to do some logic if grid is empty.

alejandro-du commented 6 years ago

Sure, would you like to add it yourself and send a Pull Request? That way you'd become a contributor to this project :)

alejandro-du commented 5 years ago

Closing this since you can get the size of the underlying data provider as follows: crud.getGrid().getDataProvider().size(new Query<>()).