我需要知道如何使用值爲Store
的值填充Label
。在我的Model
中,我定義了一個名爲bookname
的字段。我需要使用書名填充此標籤。如何爲標籤和文本框添加值
我知道如何爲Grid執行此操作,但不知道如何爲Label
或Textfield
執行此操作。
在網格中;
{ text: "Book Name", dataIndex: 'bookname'},
但是,我們如何爲標籤和文本字段添加值。
UPDATE
我仍然有問題。我無法將這些值設置爲標籤。 (從STORE加載後)。該標籤被顯示,但它不會使用從STORE獲得的值填充。這樣沒有錯誤。
Ext.define('Ex.view.info', {
extend: 'Ext.window.Window',
alias: 'widget.info',
initComponent: function() {
var st = Ext.getStore('peopleinformation');
st.load();
this.items = [
{
xtype: 'label',
forId: 'myFieldId',
text: 'My Awesome Field',
name: 'personfirstname',
margins: '0 0 0 10'
}
];
this.callParent(arguments);
}
});
這是爲什麼降不投票評論均勻。 – Illep 2012-07-06 11:14:46