History onValueChange() not called when application is loaded?

28 views
Skip to first unread message

hbf

unread,
Jan 13, 2012, 7:48:48 AM1/13/12
to Google Web Toolkit
Dear all,

I am following the instructions for History management
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html
but even though I register my history handler in onModuleLoad(), it
does not fire when I load my application with a fragment in the URL.

It does fire, however, when I manually change the fragment in the
browser URL field.

Does anybody have any idea what I might be doing wrong?

Thanks,
Kaspar

hbf

unread,
Jan 13, 2012, 8:08:49 AM1/13/12
to Google Web Toolkit
Looking at the tutorial http://mangstacular.blogspot.com/2011/12/gwt-history-mechanism.html
it seems that at application startup, no history change event is
fired. I couldn't find any official documentation confirming this, but
the text

"The application was just started and was passed a history token."

on http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html
makes me think it should be fired...

On Jan 13, 1:48 pm, hbf <kaspar.fisc...@dreizak.com> wrote:
> Dear all,
>
> I am following the instructions for History managementhttp://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHist...

Patrick Julien

unread,
Jan 13, 2012, 8:50:50 AM1/13/12
to google-we...@googlegroups.com

Xybrek

unread,
Jan 14, 2012, 2:02:12 PM1/14/12
to Google-We...@googlegroups.com

This happened to my application before, maybe you can try implementing
the interface instead of History.addValueChangeHandler

Like this:

public class MainEntryPoint implements EntryPoint, ValueChangeHandler {
// stuff
@Override
public void onValueChange(ValueChangeEvent event) {
// do your stuff
}
}

Cheers.

Reply all
Reply to author
Forward
0 new messages