Java 如何在同一面板Extjs 4.2中多次使用同一xtype?

Java 如何在同一面板Extjs 4.2中多次使用同一xtype?,java,javascript,extjs,scripting,extjs4.2,Java,Javascript,Extjs,Scripting,Extjs4.2,也许我的问题是ExtJS4.2中的基本问题,我需要使用相同的xtype(它是一个视图),以便在同一页面中多次重复使用。我的代码部分 在这个面板中,我需要多次调用xtype { xtype : 'panel', title : 'Payment Received at this Nostro Account', flex : 2, layo

也许我的问题是ExtJS4.2中的基本问题,我需要使用相同的xtype(它是一个视图),以便在同一页面中多次重复使用。我的代码部分

在这个面板中,我需要多次调用xtype

{
                    xtype : 'panel',
                    title : 'Payment Received at this Nostro Account',
                    flex : 2,
                    layout : {
                        type : 'anchor'
                    },
                    items : [
                        {
                            xtype: 'label',
                            forId: 'pymntRcvdNostroIntermediary',
                            text: 'Intermediary',
                            margins: '0 0 0 10'
                        },
                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution',
                            cls : 'settlementInstitution',
                        },
                        {
                            xtype: 'label',
                            forId: 'pymntRcvdNostroBenBank',
                            text: 'Benificiary Bank',
                            margins: '0 0 0 60'
                        },
                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution',
                            cls : 'settlementInstitution',
                        },
                        {
                            xtype: 'label',
                            forId: 'pymntRcvdNostroBen',
                            text: 'Benificiary',
                            margins: '0 0 0 120'
                        },
                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution',
                            cls : 'settlementInstitution',
                        }
这是xtype(要多次使用的同一视图)


我认为您只需要为每个
xtype
拥有
唯一id
,它的工作原理如下。对于这两个类型,我分别将id更改为
settlementInstitution1
和&
settlementInstitution2

                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution1',
                            cls : 'settlementInstitution',
                        },
                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution2',
                            cls : 'settlementInstitution',
                        },

我认为您只需要为每个
xtype
拥有
唯一id
,它的工作原理如下。对于这两个类型,我分别将id更改为
settlementInstitution1
和&
settlementInstitution2

                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution1',
                            cls : 'settlementInstitution',
                        },
                        {
                            xtype : 'settlementInstitution',
                            id : 'settlementInstitution2',
                            cls : 'settlementInstitution',
                        },