2013년 10월 16일 수요일

Creating Ext.XTemplate member functions

1. We begin by creating our sample data and our basic Ext.XTemplate in the same
way as we did in the previous recipe:
var bugData = [{
id: 1,
title: 'Bug 1',
description: 'Bug 1 Description',
status: 'In Progress',
severity: 1
}
...
];

var tpl = new Ext.XTemplate('',

'',

' ',
'Title',
'Description',
'Severity',
'
','',
' style="background-color: pink; border: 2px solid
#FF0000;"
>','{title}',
'{description}',
'{severity}',
'
','
','
',{
isHighPriority: function(severity){
return severity > 3
}
}
);
tpl.overwrite(Ext.getBody(), bugData);

댓글 없음:

댓글 쓰기