Ext.define('DynamicButtonText', { extend: 'Ext.button.Button', initComponent: function() { this.text = "ss"; alert("alert in initComponent second") this.renderTo = Ext.getBody(); }, constructor:function(){ this.text = new Date(); alert("alert in constructor first") //如果initComponet,constructor同时存在callParent必须写在constructor中 //否则initComponet中的内容不执行 this.callParent(); }, scope:this }); Ext.onReady(function() { Ext.create('DynamicButtonText'); });
详细解决方案
Extjs4 initComponent 和 constructor 的一点有关问题
热度:565 发布时间:2012-07-05 07:59:18.0
相关解决方案
- ExtJS4.0 文件上传的返回JSON字符串不对,该如何解决
- ()extjs4.0 mvc模式中,在controller中获取view层的元素对象
- 初学者发问:The constructor Printwriter(String) is undefined
- Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net,该怎么处理
- extjs4.0 多条件检索
- ExtJs4 将Grid的状态保留到服务器端
- 【error C2512】VC++编译异常 no appropriate default constructor available
- Extjs4 MVC的JS加载有关问题!
- EXTJS4 tabpanel选项卡里面的面板不显示滚动条
- ExtJs4.1的有关问题,求大牛帮忙看下
- extjs4.0表格行双击不响应
- extjs4 gridpanel 行边框如何变色
- extjs4.0 form数据加载有关问题
- extjs4.1 form交付时waitMsg的样式
- ExtJS4.x设立表单中控件为可用
- ExtJS4.0 资料上传的返回JSON字符串不对
- Extjs4 Store B删除Store A解决思路
- 求教 extjs4 点击树节点 新建tab并加载不同的grid解决思路
- ExtJS4.0 文件下传的返回JSON字符串不对
- extjs4.0下传有关问题 SSH+extjs4.0
- extjs4 tree如何判断一棵树没有选中任何节点?
- ExtJs4 ComboBox级联解决办法
- Extjs4.0的API怎样才能在页面上能够全部显示出来?解决方案
- extjs4.0中点击gird中某一列,怎么跳转至一个新的界面呢
- Extjs4.0中grid表格没有数据?解决方法
- extjs4 怎样让子容器控制父容器的高度解决方案
- Extjs4 Web Application Development Cookbook学习札记四
- Extjs4 添多个tbar
- Extjs4 gridPanel 列依照百分比分配宽度
- Extjs4 简略的Tree panel树例子