Thursday, December 1, 2011

Re: How to handle Browser History using UiBinder ?

Hi, 

If you follow MVP or not is not a big matter here, I suggest you to use GWT's Activities and Places framework built only for history management needs.

As Thomas said, UIBinder is nothing to do with history management.

If you which widget container needs to be bookmarked, You can write Place and Activity for that widget container and put all of the onModuleLoad of your module and that's it ActivityManager manages the tokens and getting back the previous status of the UI.


above link helps you in writing Activities and Places, remember your application need not to follow MVP always, but its best practice to manage the application well.

Regards,
Saida. 

On Wed, Nov 30, 2011 at 1:30 PM, Alexandre Ardhuin <alexandre.ardhuin@gmail.com> wrote:
Hi,

see http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html

Alexandre


2011/11/30 suresh babu <sureshgbabu85@gmail.com>
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.

--
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.



--
Regards,
Saida Dhanavath

--
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