cromw...@google.com
unread,Nov 1, 2012, 2:50:33 PM11/1/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to per...@google.com, skyb...@google.com, google-web-tool...@googlegroups.com, re...@gwt-code-reviews-hr.appspotmail.com
You could also return a "Live" Map implementation so that the Map always
reflects the most up to date values even if getParameterMap() isn't
called. The same caching logic would apply.
> On 2012/10/31 19:28:36, skybrian wrote:
> > If we have an explicit reloadParameters method, it should probably
clear both
> > paramMap and listParamMap.
> Oh right, missed that.
> > However, I think it's better not to make GWT apps have to call this
new
> method;
> > instead we should automatically sync. But doing it in popstate seems
> > insufficent? Apparently we'd have to handle changes via pushstate
and
> > replacestate as well? [1]
> Interesting. I experimented with Chrome before sending this CL; Chrome
does
> trigger a popstate event when pushState is called (didn't try
replaceState but I
> guess it's the same).
> I think I've heard somewhere that Chrome didn't use to do that, but it
> definitely does at the moment.
> > A more robust approach would be to cache the query string used to
populate
> > paramMap and listParamMap and automatically clear both if
getQueryString() !=
> > cachedQueryString. This would mean calling getQueryString() every
time we
> > retrieve a parameter via getParameter() or getParameterMap(); this
is cheap in
> > the default implementation but looks a bit more expensive in
> WindowImplIE.java.
> > It seems unlikely this is performance-critical code, though.
> Yes, this sounds better to me.