[richfaces-svn-commits] JBoss Rich Faces SVN: r11562 - trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Thu Dec 4 12:52:59 EST 2008
Author: nbelaevski
Date: 2008-12-04 12:52:59 -0500 (Thu, 04 Dec 2008)
New Revision: 11562
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
Richfaces.mergeObjects function added
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-12-04 17:47:30 UTC (rev 11561)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-12-04 17:52:59 UTC (rev 11562)
@@ -442,4 +442,20 @@
element.removeAttributeNode(node);
}
}
+};
+
+Richfaces.mergeObjects = function() {
+ var target = arguments[0];
+ if (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ if (source) {
+ for (var name in source) {
+ if (!target[name]) {
+ target[name] = source[name];
+ }
+ }
+ }
+ }
+ }
};
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list