I would like to set manually each items when I create them. I'm a newbie in Js but I search for a long time and no find the answer : I need some help please. When I make a new annonce, how reach each field ?
function annonce() { return {
// scroll: 'vertical',
items: [{
xtype: 'fieldset',
title: 'Annonce',
items: [{
xtype: 'textfield',
id:'titre'
label: 'Vente',
},
{
xtype: 'urlfield',
id: 'contact',
label: 'Contact',
//placeholder: 'Steve Jobs'
}]
}]
};
}
var card = new Ext.Panel({
scroll: 'vertical',
activeItem: 0, // make sure the active item is set on the container config!
bodyStyle: 'padding:15px',
defaults: {
// applied to each contained panel
border:false
},
// just an example of one possible navigation scheme, using buttons
// the panels (or "cards") within the layout
items: [
new annonce({
id: 'card-0',
title: 'test1',
Ext.getCmp('titre').setValue('mac'); // <-- don't work
}),
new annonce({
id: 'card-1',
Ext.getCmp('titre').setValue('rolls'); // <-- don't work
}),
new annonce({
id: 'card-2'
})]
});
demos.Forms = card;