Hybrid View

  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    7
    Vote Rating
    0
    hervest is on a distinguished road

      0  

    Default Unanswered: add() and remove() extjs4

    Unanswered: add() and remove() extjs4


    I have 2 panels (center panel and west panel). the first one (west panel) have a button. What i want to do is that when i click on my button, my form appear on the center pannel. For that i have used this code
    Code:
    xtype:'button',     
     text: 'Button 1',      
    handler: function(){ replace(cardWizard, 'wizard');
    }
    Code:
    var currentName;
     var replace = function(config, name) { 
                         var cp = Ext.getCmp('centerPanel');
                         if (name && name != currentName) { 
                           currentName = name;                     
                            cp.remove(0);                    
                            cp.add(Ext.apply(config));   }
                      }
    Now when i click on my button, my form appear, in second time the component of my form start deseapearing, once time again, the same thing arrives until the total dispearance of the form. It's like the add() fonction work only one time. it is the best ways i have done it? why my form deseaper? i want to set up a small software with button on west panel and form on center panel.

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Location
    Vancouver, Canada
    Posts
    157
    Answers
    5
    Vote Rating
    14
    el_chief will become famous soon enough

      0  

    Default


    can you try this sentence again? it is not clear

    "
    in second time the component of my form start deseapearing, once time again, the same thing arrives until the total dispearance of the form. It's like the add() fonction work only one time
    "

    1. learn Firebug, and see what is actually going on. Use the debug versions of the libraries. Learn the debugger; javascript statement. Learn about breakpoints, and stepping through and over functions.

    2. read up on the documentation of MixedCollections, that is the type that the Card panel uses

    http://docs.sencha.com/ext-js/4-1/#!...ixedCollection

    3. consider the setActiveItem() method of CardLayout

    http://docs.sencha.com/ext-js/4-1/#!...-setActiveItem

    4. Put your code on JSFiddle so we can help you

    Man, wouldn't it be awesome if Sencha had the following...

    1. Their own version of JSFiddle that was a little more Ext or Touch friendly?! Maybe you could partner with them! Have the latest versions of the libraries, auto style sheets. Good times.

    2. A forum more like Stackoverflow with voting and stuff.

Thread Participants: 1

Tags for this Thread

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