1. #1
    Sencha User
    Join Date
    May 2011
    Posts
    12
    Vote Rating
    0
    danieljamesscott is on a distinguished road

      0  

    Default Unanswered: 'Loading' in GXT 3

    Unanswered: 'Loading' in GXT 3


    Hi,

    With GXT 2, I had a 'loading' image (large-loading.gif) which was displayed in a <div> in the main index.html. Then, at the end of MainEntryPoint, I called:

    GXT.hideLoadingPanel("loading");

    Can anyone explain how to do the equivalent in GXT3 - there are no resources in the war directory any more.

    Thanks,

    Dan

  2. #2
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    239
    Answers
    4
    Vote Rating
    2
    gishmo is on a distinguished road

      0  

    Default


    Hi,

    this can be done with basis GWT features.
    Just put a division with the ID 'loading' on your host page.

    You can remove it with this code called in your EntryPoint:

    PHP Code:
      private void hideSplash() {
        
    Timer delayedTimer = new Timer() {
          @
    Override
          
    public void run() {
            
    Element splash DOM.getElementById("loading");
            if (
    splash != null && splash.hasParentElement()) {
              
    splash.removeFromParent();
            }
          }
        };
        
    delayedTimer.schedule(1000);
      } 
    Frank

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    12
    Vote Rating
    0
    danieljamesscott is on a distinguished road

      0  

    Default


    Thanks, I'd just discovered this:

    Code:
    DOM.removeChild(RootPanel.getBodyElement(), DOM.getElementById("loading"));
    But I should have been clearer - the loading image that I'm using is:

    gxt/images/default/shared/large-loading.gif

    Is there an equivalent in GXT 3? I believe that the resources have all been moved into embedded jar files.

  4. #4
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    239
    Answers
    4
    Vote Rating
    2
    gishmo is on a distinguished road

      0  

    Default


    Well, why not using in with GXT 3?
    Delete everything expect this image ...

  5. #5
    Sencha User
    Join Date
    May 2011
    Posts
    12
    Vote Rating
    0
    danieljamesscott is on a distinguished road

      0  

    Default


    Sure, that'll work. But I wanted to know the 'correct' way to do it with the new version. Is there no 'loading' resource provided in 3.0?

  6. #6
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    239
    Answers
    4
    Vote Rating
    2
    gishmo is on a distinguished road

      0  

    Default


    I#ll think, this is the correct way.
    If you use plain GWT you will do it in this way.

  7. #7
    Sencha User
    Join Date
    May 2011
    Posts
    12
    Vote Rating
    0
    danieljamesscott is on a distinguished road

      0  

    Default


    What if I didn't have a V2 'loading' gif - does V3 not provide a loading gif compiled into a jar? I believe that this is what it does with all the other resources (css, etc).

  8. #8
    Ext GWT Premium Member
    Join Date
    Aug 2010
    Location
    Germany, Solingen
    Posts
    239
    Answers
    4
    Vote Rating
    2
    gishmo is on a distinguished road

      0  

    Default


    Just take anything. Look for open source gifs. That's the way I solved it. ;-)

Thread Participants: 1