JBoss Rich Faces SVN: r18094 - root/ui/dist/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:40:21 -0400 (Thu, 15 Jul 2010)
New Revision: 18094
Added:
root/ui/dist/branches/richfaces-ui-dist-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/ui/dist/branches/richfaces-ui-dist-4.0.0.20100713-M1 (from rev 18093, root/ui/dist/tags/richfaces-ui-dist-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18093 - root/ui/output/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:40:04 -0400 (Thu, 15 Jul 2010)
New Revision: 18093
Added:
root/ui/output/branches/richfaces-ui-output-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/ui/output/branches/richfaces-ui-output-4.0.0.20100713-M1 (from rev 18092, root/ui/output/tags/richfaces-ui-output-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18092 - root/ui/iteration/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:39:40 -0400 (Thu, 15 Jul 2010)
New Revision: 18092
Added:
root/ui/iteration/branches/richfaces-ui-iteration-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/ui/iteration/branches/richfaces-ui-iteration-4.0.0.20100713-M1 (from rev 18091, root/ui/iteration/tags/richfaces-ui-iteration-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18091 - root/ui/misc/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:39:25 -0400 (Thu, 15 Jul 2010)
New Revision: 18091
Added:
root/ui/misc/branches/richfaces-ui-misc-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/ui/misc/branches/richfaces-ui-misc-4.0.0.20100713-M1 (from rev 18090, root/ui/misc/tags/richfaces-ui-misc-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18090 - root/ui/core/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:39:04 -0400 (Thu, 15 Jul 2010)
New Revision: 18090
Added:
root/ui/core/branches/richfaces-ui-core-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/ui/core/branches/richfaces-ui-core-4.0.0.20100713-M1 (from rev 18089, root/ui/core/tags/richfaces-ui-core-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18089 - root/cdk/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:38:14 -0400 (Thu, 15 Jul 2010)
New Revision: 18089
Added:
root/cdk/branches/richfaces-cdk-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/cdk/branches/richfaces-cdk-4.0.0.20100713-M1 (from rev 18088, root/cdk/tags/richfaces-cdk-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18088 - root/core/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:37:51 -0400 (Thu, 15 Jul 2010)
New Revision: 18088
Added:
root/core/branches/richfaces-core-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/core/branches/richfaces-core-4.0.0.20100713-M1 (from rev 18087, root/core/tags/richfaces-core-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18087 - root/commons/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:37:26 -0400 (Thu, 15 Jul 2010)
New Revision: 18087
Added:
root/commons/branches/richfaces-commons-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/commons/branches/richfaces-commons-4.0.0.20100713-M1 (from rev 18086, root/commons/tags/richfaces-commons-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18086 - root/build/bom/branches.
by richfaces-svn-commits@lists.jboss.org
Author: jbalunas(a)redhat.com
Date: 2010-07-15 14:37:00 -0400 (Thu, 15 Jul 2010)
New Revision: 18086
Added:
root/build/bom/branches/richfaces-bom-4.0.0.20100713-M1/
Log:
Created Milestone1 branch
Copied: root/build/bom/branches/richfaces-bom-4.0.0.20100713-M1 (from rev 18085, root/build/bom/tags/richfaces-bom-4.0.0.20100713-M1)
14 years, 5 months
JBoss Rich Faces SVN: r18085 - in root/core/trunk/impl/src: test/resources/javascript and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-07-15 12:39:03 -0400 (Thu, 15 Jul 2010)
New Revision: 18085
Modified:
root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js
Log:
removed attachToDom from protected methods
fixed tests
Modified: root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js
===================================================================
--- root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-15 11:44:37 UTC (rev 18084)
+++ root/core/trunk/impl/src/main/resources/META-INF/resources/richfaces-base-component.js 2010-07-15 16:39:03 UTC (rev 18085)
@@ -25,12 +25,8 @@
var myPrivateMethod = function () {
}
- // create container for protected method's links
- // in this example we link private method as protected
- var $p ={myProtectedMethod: myPrivateMethod};
-
// Extend component class and add protected methods from parent class to our container
- $p = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.MyComponent, $p);
+ richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.MyComponent);
// define super class link
var $super = richfaces.MyComponent.$super;
@@ -56,27 +52,8 @@
this.id = componentId;
};
- /**
- * <protected> Attach component object to DOM element by component id, DOM element or jQuery object and returns the element
- *
- * @function
- * @name RichFaces.BaseComponent#attachToDom
- * @param {string|DOMElement|jQuery} source - component id, DOM element or DOM elements wrapped by jQuery
- *
- * @return {DOMElement}
- * */
- var attachToDom = function(source) {
- source = source || this.id;
- var element = richfaces.getDomElement(source);
- if (element) {
- element["richfaces"] = element["richfaces"] || {};
- element.richfaces.component = this;
- }
- return element;
- }
+ var $p = {};
- var $p = {attachToDom:attachToDom};
-
/**
* Method extends child class prototype with parent prototype
* and return the object with parent's protected methods
@@ -87,6 +64,7 @@
* @return {object}
* */
richfaces.BaseComponent.extend = function (parent, child, h) {
+ h = h || {};
var F = richfaces.blankFunction;
F.prototype = parent.prototype;
child.prototype = new F();
@@ -98,6 +76,7 @@
// create wrapper with protected methods and variables
child.extend = function (_parent, _child, _h) {
+ _h = _h || {};
var _r = jQuery.extend({}, r||h||{}, _h||{});
return richfaces.BaseComponent.extend(_parent, _child, _r);
}
@@ -145,6 +124,25 @@
},
/**
+ * Attach component object to DOM element by component id, DOM element or jQuery object and returns the element
+ *
+ * @function
+ * @name RichFaces.BaseComponent#attachToDom
+ * @param {string|DOMElement|jQuery} source - component id, DOM element or DOM elements wrapped by jQuery
+ *
+ * @return {DOMElement}
+ * */
+ attachToDom: function(source) {
+ source = source || this.id;
+ var element = richfaces.getDomElement(source);
+ if (element) {
+ element["richfaces"] = element["richfaces"] || {};
+ element.richfaces.component = this;
+ }
+ return element;
+ },
+
+ /**
* Destroy method. Will be called before remove component from the page
*
* @function
Modified: root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js
===================================================================
--- root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js 2010-07-15 11:44:37 UTC (rev 18084)
+++ root/core/trunk/impl/src/test/resources/javascript/richfaces-base-component-qunit.js 2010-07-15 16:39:03 UTC (rev 18085)
@@ -8,11 +8,10 @@
var $p ={a:function(){return "hello"}};
$p = richfaces.BaseComponent.extend(richfaces.BaseComponent, MyComponent, $p);
- equals(typeof $p.attachToDom, "function", "ComponentCreation: inherit protected method from BaseComponent");
var $super = MyComponent.$super;
jQuery.extend(MyComponent.prototype, (function () {
- return { name:"MyComponent", attachToDom: function(){$p.attachToDom.apply(this,arguments);}}
+ return { name:"MyComponent"}
})());
equals(MyComponent.$super, richfaces.BaseComponent.prototype, "New component: MyComponent from");
};
@@ -30,7 +29,7 @@
// BaseComponent inheritance
test("RichFaces.BaseComponent inheritance", function () {
- expect(29);
+ expect(26);
createMyComponentClass(RichFaces);
@@ -47,7 +46,6 @@
};
var $p = {b:"b"};
$p = MyComponent.extend(MyComponent, MyComponent2, $p);
- equals(typeof $p.attachToDom, "function", "ComponentCreation: inherit protected method from BaseComponent");
equals(typeof $p.a, "function", "ComponentCreation: inherit protected method from MyComponent2");
var $super = MyComponent2.$super;
jQuery.extend(MyComponent2.prototype, (function () {
@@ -71,7 +69,6 @@
};
var $p = {c:"c"};
$p = MyComponent2.extend(MyComponent2, MyComponent3, $p);
- equals(typeof $p.attachToDom, "function", "ComponentCreation: inherit protected method from BaseComponent");
equals(typeof $p.a, "function", "ComponentCreation: inherit protected method from MyComponent2");
equals(typeof $p.b, "string", "ComponentCreation: inherit static protected property from MyComponent3");
var $super = MyComponent3.$super;
14 years, 5 months