モデルの特定の値をフォームに複数回表示する必要があるという要件があります。しかし、試してみると、最初の参照がマップされた状態でのみフォームが読み込まれ、他の参照は読み込まれません。
型式コード
Ext.define('USOC',{
extend: 'Ext.data.Model',
fields: [
{name: 'USOCCode', mapping: 'Detail > USOCCode'},
'USOCCode',
'TariffReference',
'Telephone',
'EffectiveDate',
フォームコード
items: [{
columnWidth: 0.4,
margin: '3 0 0 10',
xtype: 'container',
layout:'anchor',
height: 280,
defaults: {
labelWidth: 150
},
defaultType: 'textfield',
items: [{
xtype: 'container',
layout: 'hbox'
},
{
xtype: 'fieldset',
title: 'Recurring Charge Footnote Key',
columnWidth:1.5,
layout: 'column',
defaultType: 'textfield',
width:1285,
//height:200,
defaults: {
labelWidth: 120,
margin: '3 0 0 40',
fieldStyle:"border:none 0px black",
readOnly: true
},
items: [{
fieldLabel: 'Universal Service Ordering Code',
name: 'USOCCode',
width: 350,
labelWidth: 180
},{
fieldLabel: 'Footnote Key',
name: 'FootnoteKey',
width: 250
},{
fieldLabel: 'Description',
name: 'Description1',
width: 500
}]
},
{
xtype: 'fieldset',
title: 'Non - Recurring Charge Footnote Key',
columnWidth:1.5,
layout: 'column',
defaultType: 'textfield',
width:1285,
//height:200,
defaults: {
labelWidth: 120,
margin: '3 0 0 40',
fieldStyle:"border:none 0px black",
readOnly: true
},
items: [{
fieldLabel: 'Universal Service Ordering Code',
name: 'USOCCode',
width: 350,
labelWidth: 180
},{
fieldLabel: 'Footnote Key',
name: 'FootnoteKey1',
width: 250
},{
fieldLabel: 'Description',
name: 'Description2',
width: 500
}]
上記のコードのように、fieldSet の「繰り返し料金の脚注キー」と「非繰り返し料金の脚注キー」の USOCCode を表示しようとしています。ただし、値は最初の参照にのみ表示され、2 番目の参照には表示されません。名前は一意でなければならないというAPIを読みましたが、2回表示する必要がある場合、同じ回避策はありますか??
前もって感謝します