我有一個字段集顯示和隱藏功能的問題。 在我的左側的應用程序中,我有一個更改偵聽器的組合框。在右側,我有幾個不同的文本框顯示和隱藏根據選擇組合框中的值。 每個隱藏和顯示功能都與字段集一起工作,但是如果我不能顯示/隱藏字段集。 Fieldset引用是可見的,我可以用console.log()函數列出這個組件。extjs4 fieldset.show()和fieldset.hide()不是功能問題
這裏有一塊我的代碼:
var rigthPanelLeftContainer = {
flex: 1,
minWidth: 200,
defaults: {
xtype: 'textfield',
minWidth: 180,
anchor: '100%'
},
items: [
//some working textfields here
{
xtype: 'fieldset',
labelWidth: 160,
anchor: '100%',
height: 40,
itemId: 'remarkId',
title: 'title'],
hidden : !ifHideIt, //boolean
items: [{
xtype: 'text',
height: 25,
text: 'sometext']
}]
}
]};
var comboBoxConnectors = {
xtype: 'combobox',
fieldLabel: Ext.translations.map['field.label.common'],
store: Ext.state.Manager.get('conTypes'),
editable: false,
queryMode: 'local',
name: 'conType',
itemId: 'conTypeField',
value: connObj === null ? conTypes[0] : connObj.type,
labelWidth: 160,
anchor: '100%',
listeners: {
change: function(obj, newValue, oldValue) {
//many hide/show working on textfield functions
var remarkId = me.query('#remarkId');
console.log(remarkId); //returns my fieldset element
remarkId.hide(); //returns remarkId.hide is not a function
}
}
}
我真的需要你的幫助的傢伙,什麼問題呢?