0
ExtJS 3.3.1でxtypesを登録する際に問題があります。ExtJS xtype登録
2つの文字列フィールドを持つ複合フィールドが必要ですが、1つしか表示されません。
私はかなりの時間それに苦労していると私は間違っているかもしれない手がかりを持っていないいくつかの助けがいいだろう。 これは私のコードです:
Ext.myApp.StringDouble = Ext.extend(Ext.form.CompositeField, {
separator: '-',
unitOptions: {},
values: ['first', 'second'],
bothRequired: false,
init: function() {
this.items = [];
var unitConf = {
};
Ext.apply(unitConf, this.unitOptions);
this.items.push(new Ext.form.TextField(Ext.apply({
name: this.values[0] + '.' + this.name,
fieldLabel: this.fieldLabel + ' ' + this.values[0],
value: this.value && this.value[this.values[0]]
}, unitConf)));
this.items.push(new Ext.form.DisplayField({
value: this.separator
}));
this.items.push(new Ext.form.TextField(Ext.apply({
name: this.values[1] + '.' + this.name,
fieldLabel: this.fieldLabel + ' ' + this.values[1],
value: this.value && this.value[this.values[1]]
}, unitConf)));
},
initComponent : function() {
this.init();
Ext.form.TextField.superclass.init.Component.call(this);
}
});
Ext.reg('stringdouble', Ext.myApp.StringDouble);
ありがとうございました。すべての最初の
これらのコンポーネントは、定義(変更ラベル、ユニット、分離器、...)によって修飾することができるテンプレートとして機能します。それらは、多くの品目が類似のパラメータを有する在庫保管のようなものに使用される。 – Zhack