まず、これらのフォーラムへの貢献/支援に感謝します。私は何日もオンラインで検索しましたが、何が悪いのかを/見つける/解決策を見つけることができません。フォームパネルがあります。最初は、ユーザーがブールステートメントを作成するために使用できる一連のフィールド(コンボボックス、テキストフィールド、ボタンなど)の単一の行(hboxレイアウトを使用するコンテナー)があります。このコンテナには、「AND」、「OR」、および「DEL」のボタンもあり、フォームパネルに別の行を追加したり(ブールステートメント)、現在の行を削除したりするために使用できます。私はコンボボックス値のローカルストアを持っていますが、これはすべて正常に機能します。私の問題は、ユーザーがコンボボックスのいずれかに値を入力した後、新しい行を追加すると、新しい行のコンボボックスリストが前の行で選択されたものに制限され、その値のみに制限されることです。新しい行のコンボボックスのストアには、firebugを介してすべての正しい値があることがわかりますが、これらにはGUIからアクセスできません。ブラウザの問題だと思いましたが、FfoxでもIEでも振ることはできません。彼らがマウスを介して選択するだけであれば、それは決して問題ではありません。コンテナの代わりにフィールドセットを使用して、コンボボックスの構成などを削除し、オンラインで検索してみました。何か考え/アイデアはありますか?
Ext.define('SearchTool.view.main.component.QueryBuilderRow', {
extend: 'Ext.container.Container',
alias: 'widget.builderRow',
requires: ['SearchTool.config.Config'],
layout: 'hbox',
items: [{
xtype: 'combo',
cls: 'cboxFields',
store: new Ext.data.SimpleStore({
fields: ['fieldname', 'fieldvalue'],
data: [
['field1', 'FIELD1'],
['field2', 'FIELD2'],
['field3', 'FIELD3'],
['field4', 'FIELD4']
]
}),
editable: true,
selectOnFocus: false,
forceSelection: true,
displayField: 'fieldname',
valueField: 'fieldvalue',
emptyText: '(Select Field)',
typeAhead: true,
value: '',
triggerAction: 'query',
queryMode: 'local',
width: '15%'
}, {
xtype: 'combo',
cls: 'cboxOpers',
store: operStore,
displayField: 'opername',
valueField: 'opervalue',
emptyText: '(Select Oper)',
forceSelection: true,
typeAhead: true,
triggerAction: 'query',
shrinkWrap: 1,
selectOnFocus: false,
queryMode: 'local',
width: '15%',
enableKeyEvents: true
}, {
xtype: 'textfield',
// itemId: 'val1',
width: '18%',
emptyText: '(Enter value...)',
regex: SearchTool.config.Config.qryBuilderTextFieldRegex,
regexText: SearchTool.config.Config.qryBuilderErrText,
enableKeyEvents: true
}, {
xtype: 'combo',
cls: 'cboxAndOr',
store: andorStore,
minChars: 1,
disabled: true,
displayField: 'opername',
valueField: 'opervalue',
typeAhead: true,
emptyText: '(AND/OR)',
allowBlank: true,
enforceMaxLength: true,
matchFieldWidth: true,
mode: 'local',
width: '12%'
}, {
xtype: 'textfield',
width: '17%',
emptyText: '(Enter value...)'
}, {
xtype: 'hidden',
value: ''
}, {
xtype: 'button',
iconCls: 'icon-btnAdd',
text: 'AND',
width: '7%',
handler: function (t) {
t.up('panel').add({xtype:'builderRow'}); //add new row
t.up('panel').items.items[t.up('panel').items.items.length -
2].down('button').next('button').next('button').hide();
t.prev('hidden').setValue(' AND '); //to be passed in w/ form
}
}, {
xtype: 'button',
iconCls: 'icon-btnAdd',
text: 'OR',
width: '6.5%',
handler: function (t) {
t.up('panel').add({xtype:'builderRow'}); //add new row
t.up('panel').items.items[t.up('panel').items.items.length - 2].down('button').next('button').next('button').hide();
t.prev('hidden').setValue(' OR ');
}
}, {
xtype: 'button',
iconCls: 'icon-btnDelete',
text: 'DEL',
width: '7%',
handler: function (t, e, o) {
var i = t.up('panel').items.items;
var l = i.length; //length of the array of items
if (l > 2) i[l - 2].down('button').next('button').next('button').show();
i[t.up('panel').items.items.length - 2].down('hidden').setValue(''); //prev row hidden reset
t.up('panel').remove(t.up('container')); //remove this row
}
}]
});