时间:2016-01-18 10:17 来源: 我爱IT技术网 作者:佚名
render : function(container, position){
if(!this.rendered && this.fireEvent('beforerender', this) !==false){
if(!container && this.el){
this.el=Ext.get(this.el);
container=this.el.dom.parentNode;
this.allowDomMove=false;
}
this.container=Ext.get(container);
if(this.ctCls){
this.container.addClass(this.ctCls);
}
this.rendered=true;
if(position !==undefined){
if(Ext.isNumber(position)){
position=this.container.dom.childNodes[position];
}else{
position=Ext.getDom(position);
}
}
this.onRender(this.container, position || null);
if(this.autoShow){
this.el.removeClass(['x-hidden','x-hide-' + this.hideMode]);
}
if(this.cls){
this.el.addClass(this.cls);
delete this.cls;
}
if(this.style){
this.el.applyStyles(this.style);
delete this.style;
}
if(this.overCls){
this.el.addClassOnOver(this.overCls);
}
this.fireEvent('render', this);
var contentTarget=this.getContentTarget();
if (this.html){
contentTarget.update(Ext.DomHelper.markup(this.html));
delete this.html;
}
if (this.contentEl){
var ce=Ext.getDom(this.contentEl);
Ext.fly(ce).removeClass(['x-hidden', 'x-hide-display']);
contentTarget.appendChild(ce);
}
if (this.tpl) {
if (!this.tpl.compile) {
this.tpl=new Ext.XTemplate(this.tpl);
}
if (this.data) {
this.tpl[this.tplWriteMode](contentTarget, this.data);
delete this.data;
}
}
this.afterRender(this.container);
if(this.hidden){
this.doHide();
}
if(this.disabled){
this.disable(true);
}
if(this.stateful !==false){
this.initStateEvents();
}
this.fireEvent('afterrender', this);
}
return this;
}
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
