2010-08-15 10 views

Répondre

3

Vous pouvez utiliser des objets de configuration pour stéréotyper des bits répétitifs dans votre code.

var configObject = { 
    xtype : 'label', 
    width : 50, 
    text : 'some Text' 
} 
//create a panel 
new Ext.Panel({ 
    id: 'someID', 
    items: [ 
    configObject, 
    { 
     xtype: 'textfield' 
    }, 
    configObject, 
    { 
     xtype: 'radio'<br> 
    } 
    ] 
}) 

Ou:

new Ext.form.Label(configObject); 
Questions connexes