的元素我有一個字段:如何獲得一個字段
Ext.define('admin.view.BuzzEditForm', {
extend: 'Ext.form.Panel',
requires: ['Ext.form.FieldSet','Ext.Img'],
id: 'editorPanel',
xtype: 'buzzEditForm',
config: {
/* modal: true,
hideOnMaskTap: false,
centered: true,
width: 500,
scrollable: false,*/
items: [{
xtype: 'fieldset',
items: [
{
xtype: 'textfield',
name: 'keyword',
label: 'Mots clés'
},
{
xtype: 'textfield',
name: 'title',
label: 'Titre'
},
{
id: 'editorPanelvisual',
xtype: 'field',
label: 'Visuel actuel',
component:
{
xtype: 'container',
layout: 'hbox',
items: [
{
id: 'buzzImageField',
flex: 1,
xtype: 'image',
src: 'http://pierre.chachatelier.fr/programmation/images/mozodojo-original-image.jpg',
height: 200
},
{
id: 'buzzChooseImageField',
xtype: 'button',
iconCls: 'arrow_right',
iconMask: true,
ui: 'action',
action: 'chooseBuzzImage'
}
]
}
},
{
xtype: 'textfield',
name: 'visual',
label: 'Visuel'
}
]
}]
}
});
我可以用Ext.getCmp讓我FormPanel中(「#editorPanel」),但我怎樣才能使用其名稱字段?
謝謝你,今天你幫了我很多:)我以sencha touch開始,所以我有很多問題。 – Sebastien
你很受歡迎。我現在很忙,但希望能盡我所能幫助你們所有人。 :) –
你犯了一個語法錯誤,它是:Ext.ComponentQuery.query('textfield [name =「keyword」]') – Sebastien