Tuesday, November 29, 2011

Re: How to handle Browser History using UiBinder ?

Thank you for your quick reply, so how can I manage history without using MVP framework.

On Tue, Nov 29, 2011 at 10:01 PM, Thomas Broyer <t.broyer@gmail.com> wrote:
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");
    this.textBox.addStyleName(cssResource.textbox());
    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);

    initWidget(htmlPanel);

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

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.



--
Regards
Suresh Babu G



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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