Personally, I use history for menu structure. In your case I would imagine
that #chat would take you to a list and #chat/123 would take you to an
actual room. 'color=red' would either be kept in the user's settings, or
possibly in a cookie for users who don't log on. But I'd probably think 'if
they can't be bothered to log on, then stuff it - one more reason to sign
up.' :-)


Ian

http://examples.roughian.com


2009/6/26 Mark <mar...@gmail.com>

>
> I guess I could kind of cheat and stick it all in the History call?:
>
>    History.newItem("chat?id=1234&color=red");
>
> this will kind of make sense to end users, and I can just parse the
> history item myself for all the parameters - anything horribly wrong
> with this, or any easier way?
>
> Thanks
>
> On Jun 26, 2:56 pm, markww <mar...@gmail.com> wrote:
> > Hi,
> >
> > I'm not sure how we use history and parameters in GWT. For example,
> > when my user wants to go to a login page, I do this:
> >
> >    History.newItem("login");
> >
> > which makes the url:
> >
> >    www.mysite.com/myproject.html#login
> >
> > that's ok, if they copy and paste that url to another browser
> > instance, my app knows to automatically show the login "page".
> >
> > But what if we want to add some parameters, for instance, if we wanted
> > to create a chat room page, something like:
> >
> >    History.newItem("chat");
> >    URL.addParameter("id", "1234");
> >    URL.addParameter("color", "red");
> >
> > to make something like:
> >
> >    www.mysite.com/myproject.html#chat?id=1234&color=red
> >
> > I'm not sure how we can do that in GWT, but basically it would let the
> > user copy and paste that url into another instance, and my app would
> > be able to know to load page chat, with parameters 1234 and red.
> >
> > Thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to