Skip to content

Instantly share code, notes, and snippets.

@amaltson
Created November 2, 2010 23:02
Show Gist options
  • Save amaltson/660479 to your computer and use it in GitHub Desktop.
Save amaltson/660479 to your computer and use it in GitHub Desktop.
The driver that sets up the data binding.
public class EmailDriver {
interface Driver extends SimpleBeanEditorDriver<Email, EmailEditor> {
}
Driver driver = GWT.create(Driver.class);
void edit(Email p) {
EmailEditor editor = new EmailEditor();
// initialize the driver and edit the given email.
driver.initialize(editor);
driver.edit(p);
}
void save() {
Email edited = driver.flush();
Window.alert("Edited email: " + edited.getEmail());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment