Sunday, September 30, 2012

Editor driver factory?

I have situation where we have multiple input fields on form and each input field should be separate editor, but there is a problem since we don't know
what kind of input field actually needs to be displayed to user. So basically we get list of ids and based on that list of ids we should create form and display it to the

When creating editor we need to define interface in a following manner:

  // Empty interface declaration, similar to UiBinder
interface Driver extends SimpleBeanEditorDriver<SomeKindOfBean, SomeKindOfEditor> {}
// Create the Driver
Driver driver = GWT.create(Driver.class);

Is there any way to create Editor Driver factory, any suggestion would be great. I know that I can declare all required interfaces and then create one switch statement and create drivers
as needed, but I would like to avoid having that switch statement in every activity where we need that functionality, and would like to have some generic driver interface to work with.


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment