On Nov 10, 7:29 am, Jaap <jaap.hait...@gmail.com> wrote:
> Hi,
>
> I'm building an web app which does some searching. When ever I do a
> search on something I make a a new History Item by calling
> History.newItem(searchTerm). The History callback then does the
> searching. However if after the search the user clicks again on search
> nothing happens because the History.addValueChangeHandler does not get
> called because the value does not get changed, but I would prefer that
> the search happens again because if nothing happens the user will be
> confused
You can use History.fireCurrentHistoryState() (maybe after having
compared History.getToken() with your "searchTerm").
But I'd rather go the other way around: issue your search on click
(*and* on history changed) and at the same time update the history
*without* firing an event (History.newItem(searchTerm, false)). Of
course, this only works if you have a single HistoryHandler for your
whole app (which is generally the case).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---