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
Show replies by date