Yangman + Yangtutils - request header + rpc element bug fixing
[dlux.git] / modules / common-yangutils-resources / src / main / resources / yangutils / services / node-wrapper.services.js
index 33e959c71f1698f3767bf3721a46ed5c927c2cb7..dc9d7609484b4bf0919b611e71f9ba721f0f6bdf 100644 (file)
@@ -663,17 +663,20 @@ define([], function () {
             };
 
             node.fill = function (name, data) {
-                var filled = false,
+                var match = comparePropToElemByName(name, node.label),
                     nodesToFill = node.getChildren(null, null, constants.NODE_UI_DISPLAY);
 
-                nodesToFill.forEach(function (child) {
-                    var childFilled = child.fill(name, data);
-                    filled = filled || childFilled;
-                });
+                if (match && nodesToFill.length) {
+                    nodesToFill.forEach(function (child) {
+                        for (var prop in data) {
+                            child.fill(prop, data[prop]);
+                        }
+                    });
+                }
 
-                node.expanded = filled;
+                node.expanded = match;
 
-                return filled;
+                return match;
             };
 
             node.clear = function () {