gwt-api-generator icon indicating copy to clipboard operation
gwt-api-generator copied to clipboard

Generated GWT Widgets are not IsEditor

Open masini opened this issue 8 years ago • 4 comments

In GWT we have only the Editor framework which does a correct databinding between POJOs and Widgets.

I've tried with no success Errai Databinding, to simplistic for a complex interface.

Unfortunately generated widgets are Panels, and as such they don't implement IsEditor interface, which is what the Editor framework uses for integration between generated Autobeans and Wdgets.

I would like the generator to change how it works so that we obtain Widgets compatible with it.

In case I can contribute, but I need to know if you have any suggestions for this.

Thank you.

masini avatar Dec 23 '15 08:12 masini

I'm having a similar problem. I'm interested in any possible solution.

Thanks

knives85 avatar Dec 23 '15 12:12 knives85

What do you guys suggest for implementing IsEditor? not all polymer widgets are thought for storing values, and some of them could store more than a value. A very simple solution could be consider only widgets having the getValue() method. Could you write a bunch of examples of the widgets modified so as they work for you? for instance modify PaperInput, PaperSlider. Another possibility is that you override each class with your own implementation. thoughts ?

manolo avatar Jan 13 '16 18:01 manolo

Hi Manolo, I think that we can't really understand if a web-component is also an Editor and which kind of Editor.

May be the best way is a command-line switch where, during the generation phase, we can set the kind of Editor, may be an "IsEditor<ValueBoxEditor<T>>" or a ListEditorWrapper.

What do you think ?

masini avatar Feb 03 '16 15:02 masini

We will discuss this for a future version, but not before we listen to community about the tendency on using Elements vs Widgets. It seems that GWT is encouraging the use of them instead of widgets, etc.

manolo avatar Aug 23 '16 09:08 manolo