0

新しいウィンドウにデータを渡しています。show() に到達する前に、デバッガーでデータを確認できます。新しいウィンドウにフォーム フィールドがあり、渡された値が入力されていません。そこに表示される afterrender メソッドも試しましたが、コンポーネントが表示されませんでした。ウィンドウがポップアップし、正常にレンダリングされます。しかし、何も入力されません。

これが私がやっていることです:

initComponent: function() { 
   var me = this;
    Ext.applyIf(me, {
        items: [
        {
            xtype: 'form',
            padding : 5,
            itemId: '',
            title: 'form',
            layout  : {
              type    : 'table',
              columns : 3
            },
            defaults : {
              padding : 5
            },
            items: [
            {
                xtype : 'hiddenfield',
                value : this.aId,
                name : 'announcementId',
                id : 'announcementId',
                text: 'Id',
                width: 1,
                hidden: true,
                colspan : 3
            },
            {
                xtype: 'textareafield',
                grow: false,
                width : 650,
                name: 'announcement',
                id: 'announcement',
                fieldLabel: bundle.getMsg('adminform.label.message'),
                anchor: '100%',
                // This does not populate.
                value : this.message,
                colspan : 3
            },
...
...
            }],
            listeners : {
              afterRender : function() {
                debugger;
                // Could not find the component.
                Ext.getCmp('announcement').value = this.message;
              }
            },
            viewConfig: {
              border: true,
              enableTextSelection: true
            }
        }
    ]
    });
    me.callParent(arguments);
},

// This method does go off.
showWithData : function(aId, message, start, end, active) {
  debugger;
  this.aId = aId;
  this.message = message;
  this.start = start;
  this.end = end;
  this.active = active;
  this.show();
}

どんな助けでも大歓迎です。ありがとう!

4

1 に答える 1