2013-02-16 268 views
0

顯示數據我新的ExtJS的,我已經,有醫生名單的例子,但在醫生詳細頁面,它看起來像一個人口稠密的形式,這是我的看法文件:煎茶觸摸2 - 在數據視圖

Ext.define("GS.view.DoctorView", { 
extend: "Ext.form.Panel", 
requires: "Ext.form.FieldSet", 
alias: "widget.doctorview", 
config:{ 
    scrollable:'vertical' 
}, 
initialize: function() { 

    this.callParent(arguments); 

    var backButton = { 
     xtype: "button", 
     ui: "back", 
     text: "Back List", 
     handler: this.onBackButtonTap, 
     scope: this 
    }; 

    var topToolbar = { 
     xtype: "toolbar", 
     docked: "top", 
     title: "Doctor Profile", 
     items: [ 
      backButton, 
      { xtype: "spacer" } 
     ] 
    }; 

    var bottomToolbar = { 
     xtype: "toolbar", 
     docked: "bottom", 
     items: [ 

     ] 
    }; 

    var doctorNameView = { 
     xtype: 'textfield', 
     name: 'title', 
     label: 'Title', 
     required: true 
    }; 

    var doctorDescView = { 
     xtype: 'textareafield', 
     name: 'narrative', 
     label: 'Narrative' 
    }; 

    this.add([ 
     topToolbar, 
     { xtype: "fieldset", 
      items: [doctorNameView, doctorDescView] 
     }, 
     bottomToolbar 
    ]); 
}, 
onBackButtonTap: function() { 
    this.fireEvent("backToListCommand", this); 
} 
}); 

我會採取哪些步驟將其轉換爲dataview,或者如何使用我的自定義HTML?

回答