- 浏览: 545451 次
- 性别:
- 来自: 广州
-
文章分类
- 全部博客 (339)
- JavaBase (27)
- J2EE (70)
- Database (22)
- Spring (3)
- struts1.x (6)
- struts2.x (16)
- Hibernate (10)
- IBatis (4)
- DWR (1)
- SSH (5)
- Oracle (31)
- HTML (12)
- javascript (11)
- Thinking (3)
- Workflow (5)
- Live (13)
- Linux (23)
- ExtJS (35)
- flex (10)
- php (3)
- Ant (10)
- ps (1)
- work (2)
- Test (1)
- Regular Expressions (2)
- HTTPServer (2)
- 方言 (1)
- 生活 (2)
- Sybase PowerDesigner (0)
最新评论
-
mikey_5:
非常感谢楼主的分享,<parameter propert ...
Check the output parameters (register output parameters failed) IN Ibatis -
影子_890314:
我现在也有这个错误,求解!
Check the output parameters (register output parameters failed) IN Ibatis -
358135071:
学习了,感谢分享!
使用hibernate 代替 mysql 中 limit 進行分頁 -
wjpiao:
你下面的“正确的映射”里面不是还是有number类型吗?
Check the output parameters (register output parameters failed) IN Ibatis -
zh_s_z:
很有用!弄一份吧!
Oracle数据库分区表操作方法
- /*
- * Ext JS Library 2.0
- * Copyright(c) 2006-2007, Ext JS, LLC.
- * licensing@extjs.com
- *
- * http://extjs.com/license
- */
- //构建Ext单例对象
- //js中可以直接创建对象,这和java、c++等OO语言中
- //只能定义类,再创建对象是不一样的了
- //这种方式是js中构建单例对象的一个比较好的方式了
- Ext = {version: '2.0' };
- //在浏览器端开发中,window是全局对象
- //下面句子往window这个全局对象中动态注入undefined属性
- //尽管在emac的标准中要求全局对象中必须有个undefined的状态
- //但是当浏览器替换了全局对象时间,undefined这个变量的状态可能
- //就定义了。特别是old browsers....这样的解释有任何问题可以一起留言商讨
- //这样的处理方式只能针对undefined的了。
- // for old browsers
- window["undefined" ] = window[ "undefined" ];
- /**
- * @class Ext
- * Ext core utilities and functions.
- * @singleton
- */
- /**
- * Copies all the properties of config to obj.
- * @param {Object} obj The receiver of the properties
- * @param {Object} config The source of the properties
- * @param {Object} defaults A different object that will also be applied for default values
- * @return {Object} returns obj
- * @member Ext apply
- */
- Ext.apply = function (o, c, defaults){ //从代码的实现过程来看defaults中的属性会被c中属性覆盖,default只有在
- //c中没有定义的时候,才会用default中定义的属性
- if (defaults){
- //显然这里用this也是可以调用到Ext中的apply方法的,但是想想为什么这里不用this呢?就是说下面的句子直接改为
- //this.apply(o.defaults)。
- //下面作者的注释已经说明了问题的所在了。为了在scope(作用域)之外可以友好地调用到该方法,该方法定义
- //在Ext这个全局的单例的对象之中,那么scope就是指Ext内了。那么在Ext之外调用时什么意思呢?不是可以通过
- //Ext.apply直接调用到吗,这有什么问题?
- //这样当然没有问题。不过想想js中函数调用的另外一种方式:Ext.apply.apply或者Ext.apply.call。
- //我想作者指的调用方式,就是call和apply这种scope范围之外的调用方式吧。这样作用域外调用会的话,用this关键字的话
- //问题就来了。如:function Man(){} ,Ext.apply.call(new Man(),new Man(),new Woman());
- //用上“this” reference
- //会抛出个错误说Man中的apply未定义。
- //apply和call的这种调用方式,都会有this问题。如果是Ext这样的单例对象的话,建议都不要this来内部调用,都搞Ext前缀算了。
- //以免引发一些“friendly”的问题。
- // no "this" reference for friendly out of scope calls
- Ext.apply(o, defaults); //这里要开始递归调用Ext.apply的方法了,如果defaults存在的话,递归第一轮就走到下面的代码去了。
- }
- //这里o&&c都还好理解,说明只要在o和c都存在的时候才有必要做某些操作,那么typeof c=='object'又是为了限制什么呢
- //如果不加上这个条件会怎么样?
- //这个问题与typeof能区分出什么东西息息相关,从犀牛中的typeof的解释上看,typeof只能区分对象类型与基本类型。
- //也就是说,如果发现c是基本类型的话,下面的属性拷贝工作就根本不会做了(也不应该做,但是如果真得传递一个1进去,好像也不会出现啥恐怖的事情)。
- if (o && c && typeof c == 'object' ){
- //这个就没啥好说的,c中的属性被全部拷贝到o中了
- for ( var p in c){
- o[p] = c[p];
- }
- }
- return o;
- };
- //这里使用匿名函数来完成Ext这个单例对象中相关属性的设置
- //形如:(function(){})();
- //那么这里使用匿名函数是否是有什么特殊的考虑?
- //尽管这个匿名函数的逻辑可以定义在某个有名的函数,如init_ext()中,然后再加以调用
- //但是能用匿名函数一步到位的事情为啥要分两个步骤呢:)
- //充分利用语言的性质,看来使用匿名函数形成的闭包来做初始化工作也是不错的了。
- (function (){
- var idSeed = 0; //查看下面的Ext.id方法,用来对id递增
- //下面这些策略就是为了判断浏览器的类型了,很常见的一种用法
- //既然Ext是一个cross-browser的框架,那么肯定要知道自己运行的平台是哪种浏览器了... ...
- var ua = navigator.userAgent.toLowerCase();
- //下面是摘自dhtml网页制作完全手册中,对document.caompatMode的描述
- ////When standards-compliant mode is switched on, Internet Explorer renders the document in compliance with the Cascading Style Sheets (CSS), Level 1 (CSS1) standard. When standards-compliant mode is not switched on,
- // rendering behavior is consistent with previous versions of Internet Explorer.
- var isStrict = document.compatMode == "CSS1Compat" ,
- isOpera = ua.indexOf("opera" ) > -1,
- isSafari = (/webkit|khtml/).test(ua),
- isIE = !isOpera && ua.indexOf("msie" ) > -1,
- isIE7 = !isOpera && ua.indexOf("msie 7" ) > -1,
- isGecko = !isSafari && ua.indexOf("gecko" ) > -1,
- isBorderBox = isIE && !isStrict,
- isWindows = (ua.indexOf("windows" ) != -1 || ua.indexOf( "win32" ) != -1),
- isMac = (ua.indexOf("macintosh" ) != -1 || ua.indexOf( "mac os x" ) != -1),
- isLinux = (ua.indexOf("linux" ) != -1),
- isSecure = window.location.href.toLowerCase().indexOf("https" ) === 0;
- //就是说ie7之前的ie浏览器对背景图像有些默认的处理方式,按作者的注释说,如果不执行这个command的话
- //css 图片会晃动。
- // remove css image flicker
- if (isIE && !isIE7){
- try {
- document.execCommand("BackgroundImageCache" , false , true );
- }catch (e){}
- }
- //来了,在这里将往Ext这个大对象中加入属性了
- Ext.apply(Ext, {
- /**
- * True if the browser is in strict mode
- * @type Boolean
- */
- isStrict : isStrict, //函数开始位置对平台检测的结果用上了...
- /**
- * True if the page is running over SSL
- * @type Boolean
- */
- isSecure : isSecure,
- /**
- * True when the document is fully initialized and ready for action
- * @type Boolean
- */
- isReady : false ,
- /**
- * True to automatically uncache orphaned Ext.Elements periodically (defaults to true)
- * @type Boolean
- */
- enableGarbageCollector : true , //注意看下面的Ext的垃圾回收算法... ...
- /**
- * True to automatically purge event listeners after uncaching an element (defaults to false).
- * Note: this only happens if enableGarbageCollector is true.
- * @type Boolean
- */
- enableListenerCollection:false , //注意Ext中对缓存机制....在缓存元素被删除之后,元素上面的监听器(元素上面可能绑定很多类似事件的监听器)一并会被删除掉
- /**
- * URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent
- * the IE insecure content warning (defaults to javascript:false).
- * @type String
- */
- SSL_SECURE_URL : "javascript:false" , //这个用在啥地方,很用途还不是很清楚
- /**
- * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. (Defaults to
- * "http://extjs.com/s.gif" and you should change this to a URL on your server).
- * @type String
- */
- BLANK_IMAGE_URL : "http:/" + "/extjs.com/s.gif" , //空白css背景图片,这个一定要该,否则在内存上部了网的时候,可能会出现图标正在下载的情况//下不到的话,则可能会有叉叉
- /**
- * A reusable empty function
- * @property
- * @type Function
- */
- emptyFn : function (){}, //一个占位符函数,就是用了指导某个函数上... ...prototype框架里面也专门定义了个 空函数 属性
- /**
- * Copies all the properties of config to obj if they don't already exist.
- * @param {Object} obj The receiver of the properties
- * @param {Object} config The source of the properties
- * @return {Object} returns obj
- */
- applyIf : function (o, c){ //注意与Ext.apply方法的区别,该方法只有在属性没有定义的时候才会拷贝c中的属性
- if (o && c){
- for ( var p in c){ //回忆下undefined状态,undefined状态意味着对象属性没有定义,或者某个对象声明却没有赋值
- if ( typeof o[p] == "undefined" ){ o[p] = c[p]; }
- }
- }
- return o;
- },
- /**
- * Applies event listeners to elements by selectors when the document is ready.
- * The event name is specified with an @ suffix.
- <pre><code>
- Ext.addBehaviors({
- // add a listener for click on all anchors in element with id foo
- '#foo a@click' : function(e, t){
- // do something
- },
- // add the same listener to multiple selectors (separated by comma BEFORE the @)
- '#foo a, #bar span.some-class@mouseover' : function(){
- // do something
- }
- });
- </code></pre>
- * @param {Object} obj The list of behaviors to apply
- */
- addBehaviors : function (o){ //似乎是因为使用上DomQuery库,在Ext中似乎有许多地方都使用 css的 selector(选择器)来定位一个dom节点
- if (!Ext.isReady){ //想想使用css定位器来定位对象,看来也挺ok的,元素都定位得到了。
- Ext.onReady(function (){
- Ext.addBehaviors(o);
- });
- return ;
- }
- //这个cache只是用来,做为算法的辅助工具
- //Ext.select毕竟是耗时间的事情,能省则省啊,而且一般情况下,我们调用一次addBehaviors方法只对一个元素增加监听器会比较清楚些。
- var cache = {}; // simple cache for applying multiple behaviors to same selector does query multiple times
- for ( var b in o){
- var parts = b.split( '@' );
- if (parts[1]){ // for Object prototype breakers
- var s = parts[0];
- if (!cache[s]){
- cache[s] = Ext.select(s);
- }
- cache[s].on(parts[1], o[b]); //Element的on方法了
- }
- }
- cache = null ;
- },
- /**
- * Generates unique ids. If the element already has an id, it is unchanged
- * @param {Mixed} el (optional) The element to generate an id for
- * @param {String} prefix (optional) Id prefix (defaults "ext-gen")
- * @return {String} The generated Id.
- */
- id : function (el, prefix){ //产生一个唯一的ID
- prefix = prefix || "ext-gen" ;
- el = Ext.getDom(el);
- var id = prefix + (++idSeed);
- //由于js支持类型转化,所以对象本身可以直接成为条件运算的内容,el是否存在在js中直接用if(el)来判断。
- return el ? (el.id ? el.id : (el.id = id)) : id; //el没id则才弄出id;这个要是弄好点的话,可以在函数的最开始做判断,这样就有可能免掉Ext.getDom(e1)这样的运算了。
- },
- /**
- * Extends one class with another class and optionally overrides members with the passed literal. This class
- * also adds the function "override()" to the class that can be used to override
- * members on an instance.
- * @param {Object} subclass The class inheriting the functionality
- * @param {Object} superclass The class being extended
- * @param {Object} overrides (optional) A literal with members
- * @method extend
- */
- extend : function (){
- //extend是重要的函数了,OO的继承在Ext中靠它了
- //语法上使用上了个闭包
- //函数定义完之后,马上进行调用,并且返回了也是个函数
- //从该函数的实现上看,该函数值针对子类以及父类的prototype操作,难怪Ext要求要在子类的构造函数中进行这样的调用语句
- //Subclass.superclass.constructor.call(this,arguments);显示地拷贝父类中非prototype定义的属性
- //如果非prototype所定义的方法,将不会被overrides中的属性所覆盖.
- // inline overrides
- var io = function (o){
- for ( var m in o){
- this [m] = o[m];
- }
- };
- return function (sb, sp, overrides){
- /**
- (转)
- 1,关于F的用法
- 使用F是为了避免对sb原型对象的操作,联动影响sp的原型对象.
- 2,当typeof sp == "function"时
- sb的原型将被替换,不保留任何原型属性
- sb的superclass指向sp的原型对象
- 3,当typeof sp == "object"时
- sb的原型属性将被保留
- sb的superclass指向自己的原型对象
- 效果略等同于override
- 另:
- 1,apply,applyIf主要用于typeof == "object"时的对象操作
- 2,override,extend主要用于typeof == "function"时的对象原型操作
- **/
- if ( typeof sp == 'object' ){ //如果sp也是对象的话,而不是函数类 (!='function').一般来说sp这里放的是父类的构造函数),那么第三个参数overrides参数相当于被忽略掉
- overrides = sp;
- sp = sb; //sb重新定义了函数
- }
- var F = function (){}, sbp, spp = sp.prototype;
- F.prototype = spp;
- sbp = sb.prototype = new F();
- sbp.constructor=sb;
- sb.superclass=spp;
- if (spp.constructor == Object.prototype.constructor){
- spp.constructor=sp;
- }
- sb.override = function (o){
- Ext.override(sb, o);
- };
- sbp.override = io;
- //覆盖掉子类prototype中的属性
- Ext.override(sb, overrides);
- return sb;
- };
- }(),
- 关于两个参数与三个参数extend方法注释补充。
- /**
- Ext.extend的两个参数的与三个参数的使用方法很不一样。
- 三个参数如:
- Ext.extend(Sub,Super,{})
- 直接改变了Sub的构造函数本身,让Sub的prototype指向
- Super。
- 两个参数如:
- Ext.extend(Sub,{});
- 并不改变Sub本身,从代码中看由于传递进去的Sub引用(引用的拷贝)被
- 替换为新的function,而Sub本身却没有被改变,所以
- Ext.extend(Sub,{});的执行不会改变Sub本身。
- 两个参数的extend的使用时通过,接收其返回才有意义:
- OSub = Ext.extend(Sub,{});
- Ext中也有许多地方用到两个参数的extend,如:
- Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, {
- readRecords : function(o)
- {
- // do something
- }
- });
-
*/
发表评论
-
纵向Tab ---ext
2010-09-28 16:02 1254net address: http://carina. ... -
js code compress
2010-06-11 01:22 1013文章转自: http://www.rainway.org/20 ... -
Ext.data.Store
2010-04-16 21:26 1466原文: http://www.9iext.cn/thr ... -
ExtJs 确认密码验证的两种实现
2010-03-17 16:36 5070实现1: ************************* ... -
extjs换肤
2010-02-26 14:15 1245extjs换肤 http://www.javachen ... -
ext 教程
2010-01-29 17:05 1012关于Ext 扩展比较好的文章: http:// ... -
demo
2010-01-26 20:11 1227一、下载extjs 1、从http://www.extj ... -
你的水平 字段没超出所以没 滚动条!
2009-12-16 21:36 1108你的水平 字段没超出所以没 滚动条! 你试下吧 colu ... -
在EXT中使用FCKEditor编辑器例子
2009-12-15 16:47 1264... -
js oo
2009-12-15 10:22 864var RectAngle = function(width, ... -
costom extend
2009-12-15 09:06 951//自定義繼承 ---------------------- ... -
Ext extend
2009-12-14 23:56 1324第一章 必须理解Ext.extend ... -
JS中的 prototype的含义
2009-12-14 22:02 1792搜了两 个认为好的讲解 Prototype 属性的 ... -
想起温习一下JS中的this apply call arguments
2009-12-14 21:03 1198很多时候讲到语言入门,大家会认为就是要了 ... -
阅读 Ext 学习Javascript(一)Core/Ext.js
2009-12-14 20:46 977从Library的角度 ... -
阅读Ext学习Js(二)---extend从继承说起
2009-12-14 20:45 1095一般的,如果我们定义一个类,会定义一个function对象,然 ... -
Extjs 研究: js基础
2009-12-14 20:33 10871.我们写的变量 ,函 ... -
ExtJS 入门之一 类与继承
2009-12-14 20:08 815在项目中使用ExtJS已经 ... -
Ext表單中一行多列的布局
2009-12-07 08:01 3880var simpleForm = new Ext.Form ... -
extend Ext component demo
2009-12-06 14:01 896extjs的Ext.extend的使用样例(Ext继承) ...
相关推荐
关于这个原因有很多种,我只说下我遇到的 我这样 写Store来复用的 代码如下: DocStore = Ext.extend(Ext.data.Store,{ initComponent:function(){ this.proxy = new Ext.data.HttpProxy({url:this.url}); this....
extend:'Ext.container.Container', ... }); ``` 这行代码定义了一个名为`WebApp.view.tip.ToolTip`的新类,该类继承自`Ext.container.Container`。这意味着我们可以使用所有容器类的功能。 2. **布局配置**:...
可以通过`Ext.extend()`方法实现这一点。 ```javascript Ext.define('MyApp.form.field.ClearableDate', { extend: 'Ext.form.field.Date', alias: 'widget.clearabledatefield', // 添加其他配置项... }); ``...
在ExtJS中,我们可以通过`Ext.extend()`或使用`Ext.define()`方法创建一个新的类,该类继承自现有类并可以添加新的属性和方法。对于ExtJS Grid,我们可能要扩展其基础配置,比如自定义列、行渲染器、编辑器,甚至是...
Most configuration options are inherited from Ext.Window (see ExtJs docs). The added ones are: url - the url where to post uploaded files. base_params - additional post params (default to {}). ...
Ext.ux.grid.RowspanView = Ext.extend(Ext.grid.GridView, { constructor: function(conf) { Ext.ux.grid.RowspanView.superclass.constructor.call(this, conf); }, // private // 清除合并的行中,非第一行...
"ext多选下拉列表的全选功能实现"这个主题聚焦于一个特定的UI组件——ExtJS库中的MultiComboBox,这是一种允许用户多选的下拉列表控件。在实际应用中,全选功能常常被用来快速选择所有选项,极大地提高了用户的操作...
EXTJS 学习:深入理解 `Ext.extend` 及其在继承中的陷阱 EXTJS 是一个强大的 JavaScript 框架,用于构建富客户端应用程序。它提供了丰富的组件库和强大的数据绑定机制。在 EXTJS 中,`Ext.extend` 是核心的继承机制...
`Ext.extend()` 是 ExtJS 提供的面向对象继承机制,允许你创建新的类或者扩展已有的类。在 Ext2.x 及更早版本中,它是扩展内置类的主要方式。即使在 Ext2.x 之后,理解 `Ext.extend()` 仍然是很重要的,因为它在许多...
在 ExtJS3 中,我们可以使用 Ext.extend 来定义类,而在 ExtJS4 中,我们需要使用 Ext.define 来定义类。例如,在 ExtJS3 中,我们可以使用以下代码来定义一个类: ```javascript Ext.ux.PostStore = Ext.extend...
14.1 利用Ext.extend实现继承 14.2 与ExtJS扩展相关的预备知识 14.2.1 定义命名空间 14.2.2 使用xtype 14.3 用户扩展和插件 14.3.1 编写自定义用户扩展 14.3.2 常用插件UploadDialog 14.3.3 常用插件...
14.1 利用Ext.extend实现继承 14.2 与ExtJS扩展相关的预备知识 14.2.1 定义命名空间 14.2.2 使用xtype 14.3 用户扩展和插件 14.3.1 编写自定义用户扩展 14.3.2 常用插件UploadDialog 14.3.3 常用插件...
Ext.extend(Ext.layout.container.MyIFrameLayout, Ext.layout.container.Fit, { onLayout: function(ct, target) { var iframe = ct.items.first(); if (iframe && iframe.rendered) { var iframeBody = ...
extend: 'Ext.panel.Panel', alias: 'widget.myDynamicPanel', // 这里可以添加其他配置 }); Ext.define('MyHtmlPanel', { extend: 'Ext.panel.Panel', alias: 'widget.myHtmlPanel', html: '这是通过xtype...
ExtJS的`extend`特性是其核心的面向对象机制之一,它允许我们在JavaScript中创建类的继承链。在Ext Designer的环境下,这个概念尤为重要,因为设计师工具提供了可视化的界面来帮助开发者更直观地构建和扩展组件。这...
extend: 'Ext.form.field.Date', alias: 'widget.zc_form_DatetimeField', format: "Y-m-d H:i:s", altFormats: "Y-m-d H:i:s", createPicker: function () { var me = this; return Ext.create('Ext.zc.form...
继承在ExtJS中的实现主要基于`Ext.extend()`方法,这个方法是ExtJS提供的一个静态方法,它允许一个类(子类)继承另一个类(父类)的所有属性和方法。通过`Ext.extend()`,我们可以定义新的类,同时保留和扩展已存在...
extend: 'Ext.window.Window', height: 400, width: 700, title: '文件上传', closeAction: 'hide', maximizable: true, layout: 'fit', uploadParams: null, initComponent: function() { var me = ...
- `Ext.extend(subClass, superClass[, overrides])`:创建一个新的子类,继承自指定的父类。 #### 二、Array类(第4页) - **概述**:Array类提供了处理JavaScript数组的增强功能。 - **常用方法**: - `Ext....