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 6101851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:32:50+00:00 2026-05-23T13:32:50+00:00

I am writing History.newItem(step2) but even after executing this instruction the method it should

  • 0

I am writing History.newItem(“step2”) but even after executing this instruction the method it should call is public void onValueChange(ValueChangeEvent event)
{
//code
}

but when I am doing so the method is not called I dont understand why it is not calling the method.

Below is the entire code.

{
package org.adrianwalker.gwt.uploadprogress.client;

import com.google.gwt.user.client.History;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import org.adrianwalker.gwt.uploadprogress.client.view.UploadProgressView;

public final class UploadProgress implements EntryPoint, ValueChangeHandler {

  private static final UploadProgressView UPLOAD_PROGRESS_VIEW = new UploadProgressView();
    Label step_co=new Label("Step1");
  @Override
  public void onModuleLoad() {
    Button next1=new Button("Next");

    AbsolutePanel master_panel=new AbsolutePanel();
    //RootPanel rootPanel = RootPanel.get("content");
      master_panel.setStyleName("master_panel");
      master_panel.setHeight("100px");
      master_panel.setWidth("300px");


    master_panel.add(step_co,100,25);
    RootPanel.get("master").add(master_panel,100,25);
    RootPanel.get("content").add(UPLOAD_PROGRESS_VIEW,100,150);
    RootPanel.get("content").add(next1);

      next1.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                History.newItem("step2",true);

               RootPanel.get().add(new Label(History.getToken()));
//                changeStep("token");
          }});

    RootPanel.get("content").add(next1,150,550);

  }



   public void onValueChange(ValueChangeEvent event)
 {
RootPanel.get().add(new Label("In value change"));
 String token=History.getToken();
 changeStep(token);
 }
   public void changeStep(String token)
    {
       if(token.equals("step2"))
       {
           step_co.setText("Step2");
           RootPanel.get("content").clear();
        }
   }


}
}

Please tell me how could make this call the method public void onValueChange(ValueChangeEvent event)
in the History.newItem((“step2”) instruction.

  • 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-05-23T13:32:50+00:00Added an answer on May 23, 2026 at 1:32 pm

    You will have to call

    History.addValueChangeHandler(this)
    

    somewhere in your code. That is how the history object knows to call your method when it’s fired.

    Check out GWT’s documentation for some example code.

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

Sidebar

Related Questions

Writing something like this using the loki library , typedef Functor<void> BitButtonPushHandler; throws a
I'm writing my PROMPT_COMMAND=history -a;$PROMPT_COMMAND but I still get some duplicates from different terminal
I am writing a script that is retrieving information from file places.sqlite (history) and
I'm looking for some information and a little history. I am writing a program
Writing a python program, and I came up with this error while using the
I'm writing a genome browser designed primarily to view the history of chromosomal rearrangements.
I'm considering writing a console application in C# and I want to incorporate history,
I'm writing a blog editor using pyqt4. My issue is this. There is a
I'm writing a small program in Ruby to parse a hand history log from
I am writing an Entity Framework 4.1 application. In this application I have a

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.