1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    42
    Vote Rating
    0
    edumrf is on a distinguished road

      0  

    Default Can't show a window on "onSuccess" method

    Can't show a window on "onSuccess" method


    Is there any way to show a window or any other component on a "onSuccess" method?
    I'm trying the following code and the window never show up!

    Code:
    proxy.getServiceValue("br.com.dyad.infrastructure.service.LookupService", params, new AsyncCallback(){
       public void onFailure(Throwable arg0) {
         Window.alert(arg0.getMessage());
       }
       public void onSuccess(HashMap arg0) {
         Window wnd = new Window();
         desktop.add(wnd);
         wnd.show();
       }
    }
    Any ideas?
    Thanks.

  2. #2
    Ext User
    Join Date
    Apr 2009
    Posts
    3
    Vote Rating
    0
    lkrylov is on a distinguished road

      0  

    Default


    I'm not sure if this is what you want, but I had a similar issue with showing components created as a result of an RPC call. The key was to call layout() after adding.

    Code:
               
                public void onSuccess(ComponentData result) {
                    Component c = createComponent(ComponentData);
                    add(c);
                    layout(); // Calling layout() on the parent LayoutContainer of the newly added Component
                }
    Hope this helps

  3. #3
    Sencha User
    Join Date
    Mar 2009
    Posts
    42
    Vote Rating
    0
    edumrf is on a distinguished road

      0  

    Default


    Thanks for the tip, i already tried the layout method and still doens't show, i just figure out that i had some issues with my rpc call and the error never showed up on the console.

  4. #4
    Sencha User
    Join Date
    Apr 2008
    Posts
    133
    Vote Rating
    0
    FireGlow is on a distinguished road

      0  

    Default


    Hey!

    at first it doesn't make sense to add the window to a desktop.

    Second, maybe try to set some attributes before you show the window:

    Code:
    wnd.setLayout( new FitLayout() );
    wnd.setModal( true );
    wnd.setHeight(800);
    wnd.setWidth( 800 );
    wnd.setBorders( true );
    And are you sure that your call is even fired, breakpoint inside your success-method!

Thread Participants: 2

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