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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:14:47+00:00 2026-05-18T02:14:47+00:00

Hi I play with GWT in the weekends, and I really like what i’ve

  • 0

Hi I play with GWT in the weekends, and I really like what i’ve seen
so far. I have 2 questions:

  1. I don’t really understand the execution model of my app. I think
    that’s because I don’t know javascript. I’m assuming that there is
    only one logical thread from the browser running the javascript and it
    is the same thread that updates the display (disregarding asynchronous
    requests). So when through js I add 50 elements to a frame, the 50
    elements are displayed after all of them are added to the frame. In
    other words, after the js has finished executing. Do I have it
    right? Are there articles out there on this topic?

  2. Sorry this is not a great example, but it may get my question
    across. What do I do in the following situation (design):
    a) update the text in a label to “starting…”
    b) do a bunch of js and dom manipulation
    c) update the text in the label to “finished!”

Currently, all I see is the after-effect: my dom manipulation and
“finished”. The label never displays “starting…”

How can I force the label to refresh between step a & b. I’ve seen
some posts describing that one could use the Timer and somehow force
the element to refresh. But I can’t figure out how this is achieved.

Looking forward to your suggestions. Thanks in advance.

  • 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-18T02:14:47+00:00Added an answer on May 18, 2026 at 2:14 am

    To 1): Yes, javascript is single threaded. It is up to you to implement long running operations as non-blocking. Otherwise you’re likely to run into Slow Script Warnings (see next point).

    To 2): Have a look at the IncrementalCommand class (it’s usage is described here). With it you can divide long running operations into chunks of smaller work and display progress updates to the user. A small example:

    public class Starter implements EntryPoint {
    
        private Label text = new Label();
        private Label update = new Label();
    
        @Override
        public void onModuleLoad() {
            Button btn = new Button("hit me");
            btn.addClickHandler(new ClickHandler() {
    
                @Override
                public void onClick(ClickEvent event) {
                    text.setText("starting...");
                    startIncrementalWork();
                }
            });
    
            RootPanel.get().add(text);
            RootPanel.get().add(update);
            RootPanel.get().add(btn);
        }
    
        private void startIncrementalWork() {
            IncrementalCommand cmd = new IncrementalCommand() {
    
                private int count = 0;
    
                @Override
                public boolean execute() {
                    if (count >= 10000) {
                        text.setText("finished");
                        return false;
                    }
    
                    for (int i = 0; i < 100; i++) {
                        update.setText("count " + count);
                        count++;
                    }
                    return true;
                }
            };
    
            DeferredCommand.addCommand(cmd);
        }
    }
    

    Hope that helps.

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

Sidebar

Related Questions

GWT seems like a really nice technology for Java developers who don't like (or
I have been using play 1.2.5rc4 for development of one app and I have
Using play framework 1.2.4 with scala. I have few play jobs that looks like
we have admin dashboard build in gwt and deployed on google app engine for
Does Play Framework 2.0 have any built-in equivalent to 1.2.x's jsAction ? If not,
Following is the Play 2 app, https://github.com/playframework/Play20/tree/master/samples/java/forms Which portrays Dynamic form binding where form
I am having trouble getting Restlet to play nice with GWT in the same
I just tried to use GWT-SoundManager2 to make some noise. I have just tried
Using Play Framework 2.0.4, I'd like to define my static content URLS differently regarding
I want to play Youtube Video on VideoView . I have searched very much

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.