Tuesday, November 29, 2011

Re: How to handle Browser History using UiBinder ?

UiBinder is about generating widget/layout code from XML, it has nothing to do with handling navigation within your app; i.e. instead of writing:

    this.textBox = new TextBox();
    this.textBox.setText("some text");
    String textBoxPlaceholderId = HTMLPanel.createUniqueId();
    HTMLPanel htmlPanel = new HTMLPanel("<label class='" + cssResources.label() + "'>" + SafeHtmlUtils.htmlEscape(myConstants.label()) + " <span id='" + textBoxPlaceholderId + "'></span></label>");
    htmlPanel.addAndReplaceElement(textBox, textBoxPlaceholderId);


you simply write:
   <label class="{style.label}"><ui:msg from="{myConstants.label}"/> <g:TextBox ui:field="textBox">some text</g:TextBox></label>

It has really nothing to do with "handing token with history".

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/y5fJNj7KvDgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment