I have the following class gererated by a tool (xjc). Please notice the getter of the boolean property is “isATLASAlignment”. The prefix is “is” instead of “get”.
package com.test.hello;
import javax.xml.bind.annotation.XmlElement;
public class TestBoolean {
Is there any way to work around? Because there are many boolean fields in different beans, I don’t want to change from isATLASAlignment to getATLASAlignment.
The only thing I can see, is discrepancy in case, between property and setter/getter. But it should not be a problem. Try to rename methods
isATLASAlignment and
setATLASAlignment to
isAtlasAlignment and
setAtlasAlignment respectively, to be sure it is not a problem.
Lacking a better solution, if you use Maven you can easily download sources and delve into vaadin code with the debugger. Check in the BeanItem related classes and there you should find where the method name is build to call it via reflection.
Get the file and bring it to your project inside the very same package structure and redo the part where boolean properties getters are build with ‘get’ instead of ‘is’. Override it and you’re done. The class loader will preceede your file instead of the original one.
That should make it.
However I am unaware if there are any legal aspects you have to consider with regard to your project. Bear that in mind.
Sorry, you must have misunderstood me. I meant to override the default Vaadin file where the method name is generated. It has to be a BeanItemXXX file…