0

我创建了一个视图

Ext.define("App.view.leaders.MyViewName", {
    extend: 'App.view.basePopup',
    xtype: 'MyViewName',
    config: <Ext.form.IPanel>{
        scrollable: 'vertical',           
        items: [
            {
                 xtype: 'fieldset',
                 title: 'Add New Auto Asset',
                 instructions: '<hr class="separate" />',
                 items: [
                     <Ext.field.ISelect>{
                         xtype: 'selectfield',
                         label: 'Borrower Position',
                         store: 'BorrowerPositionSelectorStore',
                     },
                     <Ext.field.ISelect>{
                         xtype: 'selectfield',
                         label: 'Asset Type',
                         store: 'AssetTypeSelectorStore',
                     },
                     {
                         xtype: 'textfield',
                         name: '',
                         label: 'Description'
                     },
                     {
                         xtype: 'numberfield',
                         name: '',
                         label: 'Value'
                     }                               
                 ]
             }
         ]
    }
});

以及控制器中该视图的实例,例如:

var newObject = Ext.create("App.view.leaders.MyViewName");

并将其动态添加到另一个视图中,如下所示:

var newAdd = this.getLeadDetail1003()
                 .down('leadDetail1003AssetsLiab')
                 .down('fieldset[itemId=AddCashAsset]');

newAdd.add(newObject);

但它没有添加到表单中!谁能告诉我我做错了什么或者我现在需要做什么?

4

0 回答 0