继承自Control的简单Template
2006-11-01 15:31 Cat Chen 阅读(1032) 评论(18) 编辑 收藏 举报// Cattism.GCamp.Template
Cattism.GCamp.UI.Template = function Cattism$GCamp$UI$Template(element)
{
var e = Function._validateParams(arguments, [
{name: "element", type: Sys.UI.DomElement}
]);
if (e) throw e;
Cattism.GCamp.UI.Template.initializeBase(this, [element]);
}
Cattism.GCamp.UI.Template.prototype.createInstance = function Cattism$GCamp$UI$Template$createInstance()
{
var result = new Sys.Preview.UI.TemplateInstance();
result.instanceElement = this._element.cloneNode(true);
return result;
}
Cattism.GCamp.UI.Template.registerClass("Cattism.GCamp.UI.Template", Sys.UI.Control, Sys.Preview.UI.ITemplate);
Cattism.GCamp.UI.Template = function Cattism$GCamp$UI$Template(element)
{
var e = Function._validateParams(arguments, [
{name: "element", type: Sys.UI.DomElement}
]);
if (e) throw e;
Cattism.GCamp.UI.Template.initializeBase(this, [element]);
}
Cattism.GCamp.UI.Template.prototype.createInstance = function Cattism$GCamp$UI$Template$createInstance()
{
var result = new Sys.Preview.UI.TemplateInstance();
result.instanceElement = this._element.cloneNode(true);
return result;
}
Cattism.GCamp.UI.Template.registerClass("Cattism.GCamp.UI.Template", Sys.UI.Control, Sys.Preview.UI.ITemplate);