
EXTJS
组件化 ( 二 )---- 简易的私有和公有
hp://www.javaeye.com/topic/477546
我一直认为,凡是我已经了解的东西,国内必定已经有了一大票人已经熟知.但是
我想我还是要继续写下去.
上一篇文章简单介绍了一下组件化的思想,下面我想写一下 EXTJS 组件化的
共有和私有,上一篇文章中的组件如下:
Js 代码
1. Ext.namespace("Lesson1.FirstPanel");
2. /**
3. *@authorandy_ghg
4. *@version2009 年 9 月 24 日 23:22:09
5. *@description第一个派生类
6. *@classLesson1.FirstPanel
7. *@extendsExt.Panel
8. */
9. Lesson1.FirstPanel=Ext.extend(Ext.Panel,{
10. frame:true,
11. //初始化函数
12. initComponent:function(){
13. //继承父类的 initComponent 函数
14. Lesson1.FirstPanel.superclass.initComponent.call(this,ar
guments);
15. //为该组件添加了一个 FormPanel
16. this.formPanel=newExt.FormPanel({
17. defaults:{anchor:"95%",allowBlank:false},
18. labelWidth:55,
19. defaultType:"text>eld",
20. items:[{
21. >eldLabel:"用户名",