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.
根据定义, 这个构造函数是用来创造新的记录。
posted on 2009-04-03 17:44
紫蝶∏飛揚↗ 阅读(8048)
评论(4) 编辑 收藏 所属分类:
EXTJS