0

extjs 4.0を初めて使用し、リストとフォームを含むhboxレイアウトを作成しようとしていますが、フォームが正しく表示されず、ラベルのみが表示され、テキストフィールドは表示されません。コードを修正してください

Ext.define("Screener.view.PharmacyView", {
    extend: 'Ext.Container',

requires : [ 'Screener.view.Pharmacyform' ],

    xtype: 'pharmacylist',
    config: {
        fullscreen: true,
        layout: 'hbox',
        title: 'Patient Assignments',
        items: [

                //our patient list is built on the Patients store, and has a title and sort button
                {                   
                    xtype: 'list', 
                    id: 'patientList',

                    itemTpl: '{lastname}, {firstname}',
                    store: Ext.create('Screener.store.Patients',{
                        storeId: 'patientStore'

                    }),

                    items:[{
                        xtype: 'titlebar',
                        docked: 'top',
                        title: 'Patients',
                        items:[{
                            xtype: 'button',
                            text: 'Sort',
                            id: 'sortButton',
                            align: 'left'
                        }]
                    }],
                    flex:1,

                },


             {xtype : 'pharmacyform',
             flex:2


             }
                ]
    }

});

フォームは次のとおりです

Ext.define( "Screener.view.Pharmacyform"、{

  xtype:'pharmacyform',   extend: 'Ext.form.Panel',    config:{    items: [
    {
        xtype: 'textfield',
        name : 'name',
        label: 'Name', placeholder: 'nametext'
    },
        ]}     });
4

1 に答える 1

0

あなたは私が信じるあなた自身のxtypesを宣言するためにエイリアス設定を使う必要があります、これを試してください

Ext.define("Screener.view.Pharmacyform", {
      extend: 'Ext.form.Panel',
      alias:'widget.pharmacyform',
于 2012-04-15T04:28:53.497 に答える