var TopicRecord = Ext.data.Record.create([
{name: 'title', mapping: 'topic_title'},
{name: 'author', mapping: 'username'},
{name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
{name: 'lastPost', mapping: 'post_time', type: 'date'},
{name: 'lastPoster', mapping: 'user2'},
{name: 'excerpt', mapping: 'post_text'}
]);
var myNewRecord = new TopicRecord({
topic_title: 'Do my job please',
username: 'noobie',
topic_replies: 1,
post_time: new Date(),
user2: 'Animal',
post_text: 'No way dude!'
});
myStore.add(myNewRecord);
Ext.data.Record.create({...});
Returns: function
A constructor which is used to create new Records according to the definition.
根據(jù)定義, 這個構(gòu)造函數(shù)是用來創(chuàng)造新的記錄。
posted on 2009-04-03 17:44
紫蝶∏飛揚↗ 閱讀(8062)
評論(4) 編輯 收藏 所屬分類:
EXTJS