FernandoPaiva FernandoPaiva - 29 days ago 7
Java Question

JPAContainer filter like?

I'm trying make a "search by name" using JPAContainer Filter. Using Compare I still didn't have success. The comparison doesn't work, for example if I enter name: fernando, the filter doesn't work.

I'm trying this.

TextField searchByName = new TextField();
searchByName.setInputPrompt("Search by name");
searchByName.addBlurListener(new BlurListener() {
@Override
public void blur(BlurEvent event) {
nameFilter();
}
});


/** filter by name */
private void nameFilter(){
if(!searchByName.getValue().isEmpty()){
Filter filter = new Compare.Equal("name", searchByName.getValue());
datasource.addContainerFilter(filter);
}
}


There's some way search with LIKE ???

Answer
Comments