1. #1
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    24
    Vote Rating
    1
    |ZUTI| is on a distinguished road

      0  

    Default ToFront for a window that is being initialized insode AsyncCallback method

    ToFront for a window that is being initialized insode AsyncCallback method


    Hey guys.

    I have a little problem that is not a show-stopper but is annoying. Anyhow, this is my async callback class.
    Code:
    public abstract class ZPortalAsyncCall<T> implements AsyncCallback<T>
    {
        private LoadingWidget loadingWidget;
        
        public ZPortalAsyncCall()
        {
        }
        
        public ZPortalAsyncCall(String loadingMessage)
        {
            loadingWidget = new LoadingWidget(loadingMessage);
            loadingWidget.show();
        }
        
        public final void onSuccess(T result)
        {
            if( loadingWidget != null )
                loadingWidget.hide();
            
            onSucceeded(result);
        }
        
        public final void onFailure(Throwable caught)
        {
            if( loadingWidget != null )
                loadingWidget.hide();
            
            onFailed(caught);
        }
        
        protected abstract void onSucceeded(T result);
        protected abstract void onFailed(Throwable caught);
    }
    The widget itself, very very basic...
    Code:
    public class LoadingWidget extends ZPortalWindow
    {
        public LoadingWidget(String loadingMessage)
        {
            this.setHeading(loadingMessage);
            
            setClosable(false);
            setResizable(false);
            setSize("150", "150");
            setLayout(new CenterLayout());
            
            add(new Image("ExtGWT/images/default/shared/large-loading.gif"));
        }    
    }
    The idea behind this is that when a RPC call is made to the server, a window pops up that lets the user know that something is in progress. This is working as intended BUT the problem is that if you perform this action on window/widget, that occupies most of the screen this notifier window that is being fired in the asyncCallback class won't be visible as it will be behind that window.

    How could I force it to be on the top? The toFront() call does nothing, presumably as it is not in any container? I could call toBack() on that big window, but if more than one of those are on the screen, the whole order was shuffled from back to front (basically the focused window before action was performed was then at the bottom, if you imagine the situation as a deck of cards).

    That's it. Just want to have it at the top.
    Thanks.

  2. #2
    Sencha Premium Member
    Join Date
    May 2011
    Posts
    24
    Vote Rating
    1
    |ZUTI| is on a distinguished road

      0  

    Default


    Oh, at the moment I just made that widget a modal one. This does mean that it is always shown Though my wish is not to have it as a modal one.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi