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
86 stars 54 forks source link

Getter for boolean not working with isBooleanGetter #37

Closed Gregzenegair closed 5 years ago

Gregzenegair commented 5 years ago

Hello,

This may be an improvement, the current crudui component throws an Exception if the getter is not set to getBoolean. So if you set a getter with isBoolean an Exception is thrown.

It would be better if both getter worked.

Thanks

alejandro-du commented 5 years ago

Hi,

The is prefix is used only with properties of the boolean primitive type. This is the JavaBean convention. Any field that is an Object should use get as a prefix in the getter name. That's the case of any Boolean (Object) property. Crud UI (actually Vaadin's Binder class) does work with boolean properties and corresponding is getters.

Gregzenegair commented 5 years ago

Hi,

Mhh, this explains that. Java is a vast world, thanks for the explanation, sorry for the false request

Cheers