javascript - Extjs proper way to show/hide -


i'm little new extjs , i'm trying figure out proper way show/hide elements.

i have following elements:

layout: 'card', items:  [  {   xtype: 'panel1'  },  {   xtype: 'panel2'  } ] 

in controller have these references setup:

refs: [ {  ref: 'p1',  selector: 'panel1' }, {  ref: 'p2',  selector: 'panel2' } ], 

each panel has form , 2 buttons @ bottom. panel 2 hidden in beginning. want show panel 2 , hide panel 1. first tried:

this.getp1().hide(); this.getp2().show(); 

...and did nothing. then, found this question , tried out following:

this.getp1().getel().hide(); this.getp2().getel().show(); 

which partially worked except failed show buttons in panel2. supposed every single element , show() each of them? must missing something.

try with:

this.getp1().hide(); //the first letter should uppercase this.getp2().show(); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -