Skip to content

Instantly share code, notes, and snippets.

@amaltson
Created November 2, 2010 23:04
Show Gist options
  • Save amaltson/660486 to your computer and use it in GitHub Desktop.
Save amaltson/660486 to your computer and use it in GitHub Desktop.
a GWT widget to edit and display Email objects.
public class EmailEditor extends Composite implements Editor<Email> {
private static EmailEditorUiBinder uiBinder = GWT
.create(EmailEditorUiBinder.class);
interface EmailEditorUiBinder extends UiBinder<Widget, EmailEditor> {
}
@UiField
TextBox email;
public EmailEditor() {
initWidget(uiBinder.createAndBindUi(this));
}
}
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<g:HTMLPanel>
<div>
Email:
<g:TextBox ui:field="email" />
</div>
</g:HTMLPanel>
</ui:UiBinder>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment