Skip to content

Instantly share code, notes, and snippets.

@meriouma
Created May 12, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meriouma/5547f08e19a37466b02d to your computer and use it in GitHub Desktop.
Save meriouma/5547f08e19a37466b02d to your computer and use it in GitHub Desktop.
Changing the title
public class MyViewImpl implements MyView, AttachEvent.Handler {
interface Binder extends UiBinder<Widget, MyViewImpl> {}
private final Widget widget;
@Inject
MyViewImpl(Binder binder) {
widget = binder.createAndBindUi(this);
widget.addAttachHandler(this);
}
@Override
public void onAttachOrDetach(AttachEvent event) {
if (event.isAttached()) {
Document.get().setTitle("This is the new title of the page");
}
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment