1. Sure, you will just need to implement an Editor interface in your component using your *Element. 2. I can think of one way of doing this; you would still bind an input element to each type, and then display only the one you want to use/handle (if you can live with that). Not sure I see the use case for this.
I think an alternative would be to use Errai: http://erraiframework.org/ On Wednesday, April 19, 2017 at 12:19:52 PM UTC-6, harshyadav wrote: > > Hi, > > I am trying to use the GWT editor framework to support data binding in my > application. While implementing it I ran into a few issues and have a > couple of questions regarding the same: > > 1) Some of these components don't use > com.google.gwt.user.* > > rather they use > com.google.gwt.dom.client.* > > For e.g. InputElement as opposed to TextBox. Is it possible to use editor > framework with dom elements? > > 2) Is it possible to bind POJO's with different field types (int, float, > String, etc.) to a single Composite implementing IsEditor? > For e.g. if there is an Input composite (wrapping TextBox), is it possible > to use the same composite for POJO fields of different types int, float, > etc. ? > > public class Test > implements Serializable { > > private Integer id; > > private String name; > > private float area; > } > > > Here name and area are of different type. Is it possible to bind these to > the same widget implementing Editor (without editor I would just parse the > values to and from String to their respective types before saving the data)? > > Also, if is it not possible to the above, is there a good alternative to > support 2 way data binding in modern GWT applications? > > Thanks, > Harsh > -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
