현재 상점이없는 formpanel이 있습니다. 내가 습득하고자하는 것은 해당 패널의 버튼을 클릭하여 해당 양식의 데이터 객체를 변수에 저장하는 것입니다. 이것을 달성하는 방법?Extjs4 변수의 Formpanel 데이터 스트로크
Ext.define('Nits.view.PropertyPanelCmp', {
extend:'Ext.form.Panel',
alias : 'widget.propertypanelCmp',
id: 'propertypanelCmp',
title: 'File properties',
height: 500,
width: 200,
draggable: false,
closable: false,
//autoScroll:true,
layout: {
align: 'stretch',
type: 'vbox'
},
fieldDefaults: {
labelWidth: 65
},
bodyPadding: 10,
initComponent: function() {
var me = this;
me.items = [
{
xtype: 'fieldset',
height: 108,
title: 'Common Properties',
items: [
{
xtype: 'textfield',
fieldLabel: 'Name',
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Type',
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Age',
anchor: '100%'
}
]
},
{
xtype: 'fieldset',
title: 'Level1 Properties',
items: [
{
xtype: 'textfield',
fieldLabel: 'Sample1',
anchor: '100%'
},
{
xtype: 'checkboxfield',
fieldLabel: 'Recursive',
// boxLabel: 'Box Label',
anchor: '100%'
},
{
xtype: 'checkboxfield',
fieldLabel: 'Delete',
// boxLabel: 'Box Label',
anchor: '100%'
},
{
xtype: 'checkboxfield',
fieldLabel: 'Read Only',
// boxLabel: 'Box Label',
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Include',
anchor: '100%'
},
{
xtype: 'textfield',
fieldLabel: 'Exclude',
anchor: '100%'
}
]
},
{
xtype: 'fieldset',
title: 'Level2 Properties',
items: [
{
xtype: 'combobox',
fieldLabel: 'File B',
anchor: '100%'
}
]
},
{
xtype: 'button',
text: 'Apply',
listeners: {
click: {
fn: me.onButtonClick,
scope: me
}
}
}
];
me.callParent(arguments);
},
//Here do what you want to when click on Apply button
onButtonClick: function(button, e, options) {
alert('Sample');
}
}
);
당신은 당신이 (워드 프로세서에 here 덮여로) 다음으로 변환해야하는 개체를 가져 Ext.form.Basic.getFieldValues
를 사용해야합니다
모든 답변을 수락했습니다. –
충분히 공정하게 작성하십시오. 그냥 확인해. 얼마나 많은 사람들이 알지 못하는지 놀랄 것입니다. – Drise