简体   繁体   中英

How can i use dataProvider in Vaadin 7

Hello all i am trying to make a grid with data in mydatabase posgresql Anyway i want to make a filtering are insede the grid there is a doc in vaadin vaadin grid example filtering but i am using vaadin 7 in my code i wrote someting like that

private void setKolonFiltre() { 

    BeanItemContainer<AdmKullanicilar> filterContainer =  
                                         new BeanItemContainer<>(AdmKullanicilar.class);
    GeneratedPropertyContainer filterProperty = 
                                         new GeneratedPropertyContainer(filterContainer);

    filteringHeader= tblKullanici.appendHeaderRow();        

    TextField filteringField = getColumnFilterField();
    filteringField.addValueChangeListener(e ->{
        filterContainer.addContainerFilter();
    });
}

is there any way to use DataProvider in Vaadin 7?

No, you cannot use DataProvider in Vaadin 7, it has been introduced in Vaadin 8.

Here are some old examples of ContainerFilter use with Vaadin 7 (since filtering is done via Container, it works same way with Grid)

https://dev.vaadin.com/svn/doc/book-examples/trunk/src/com/vaadin/book/examples/datamodel/ContainerFilterExample.java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM