Could you add an annotation for this kind of fields or just skip them in the generator?
Could you clarify what you mean by this? Is it that you have a model of type A that has a property of type B and B as a set(String, Object) method?
This is the the GXT interface that all our model objects implement. When I annotate them, I get a conflict because BindableProxyLoader also creates the "get(String)" and "set(String, Object) method.
I would really appreciate some input here, so we can decide how to proceed forward.
Unfortunately there's no way to avoid generating a proxy with set(String, Object) and get(String) methods for a @Bindable type. It's unlikely we could come up with a fix for this issue before our upcoming 4.0.0.Final release.
The best suggestion I have for you is to write a wrapper classes for you GXT models to use with data-binding. Data-binding properties are inferred from method names so something like this could work (where there are getters and setters for all the properties in the wrapped type that all delegate).
Max, thank you for a quick response.
For now, I've done exactly that - class wrapper, but we have a few hundred model objects which would mean a lot of overhead, conversions.... there is also a problem of models inside of models... (one-to-one, one-to-many).
While we are testing the framework and getting things started it's not a big problem, but eventually, this will become a show-stopper.
Can we rely on a fix for this or should we start looking for an alternative approach?
Unfortunately I cannot guarantee a fix for this issue. We currently have users of the BindableProxy API (they use it for limited run-time reflection on @Bindable models), so we would have to investigate solutions that maintain or minimize change to the API.
Still I encourage you to create a JIRA to track the issue. I will at least be able to investigate the issue after Errai 4.0.0.Final is released.
I've added the issue to Jira. I was thinking of creating a local fix in the meantime. I could make a pull request if you'd like, but not sure which way you are leaning with a "fix" - annotation or skipping the property.
Well if you are planning to come up with a fix yourself I would be happy to review a PR to see if it should go into master. Like I said before, this probably isn't something we can merge into master before our 4.0.0.Final release but possibly shortly afterwards.
As long as a fix doesn't break existing API I am not very opinionated about how to approach this.