Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8866545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:48:43+00:00 2026-06-14T16:48:43+00:00

I have a method in a class that implements ValueChangeHandler<String> this class is initialised

  • 0

I have a method in a class that implements ValueChangeHandler<String> this class is initialised from within the onModuleLoad() method like so

mainController = new MainController();
History.addValueChangeHandler(mainController);
mainController.initialise(History.getToken());

And the initialise() method looks like this;

public void initialise(String initialToken) {
    if (initialToken.equals("")) {
        History.newItem(String.valueOf(HistoryTokens.MAIN_PAGE), true);
    } else {
        History.newItem(initialToken, true);
    }
}

When the app is started with a blank history token, ie when Launch Default Browser is pressed then the onValueChange() method is called, changing the url whilst the app is running calls the onValueChange() method.

However, entering a URL in a blank browser tab with a token in the URL, ie http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997#mjh&jdfhfh=786543, does not call the onValueChange() method. I’m confused as I hit the History.newItem(initialToken, true); part of the if statement. I thought that this would ensure that onValueChange() was called. What’s going wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:48:45+00:00Added an answer on June 14, 2026 at 4:48 pm

    You should always call the History.fireCurrentHistoryState() at the end of your GWT onModuleLoad(). I think that should solve your problem.

    The thing is that the first history event ( like when you load page.com/#xyz ) is not captured by the ValueChangeHandler, you have to “fake it” with the History.fireCurrentHistoryState()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a class that implements the IDisposable interface. Something like this:
I have a class that contains this class method: def self.get_event_record(row, participant) event =
I have a method in my C# class that calls a single result from
I have an Initializer class that implements the ServletContextListener interface. In its contextInitialized() method,
I have a class Foo that implements an +(void)initialize method. I also have a
I have an inner class that implements Iterable with a method similar to the
So I have this method that get executed repeatedly public static boolean isReady(String dirPath,
I have the following method in a base class that implements System.ComponentModel.INotifyPropertyChanged: protected virtual
I have this class that implements FilenameFilter package Logic; import java.io.File; import java.io.FilenameFilter; public
I'm a little bit confused by this scenario: I have a class that implements

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.