Fix UnionTable getResponseElement
Compare changes
// terms of the Eclipse Public License v2.0 which accompanies this distribution, and is available at //
///////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -9,10 +9,9 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -9,10 +9,9 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
var mSelections = []; // mSelectionss is a list of references to objects, each containing a field named "selection"
@@ -22,7 +21,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -22,7 +21,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -30,7 +29,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -30,7 +29,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -65,7 +64,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -65,7 +64,7 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -73,21 +72,19 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -73,21 +72,19 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -99,67 +96,76 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
@@ -99,67 +96,76 @@ function CViewModel_UnionTable(aViewModel, aOptions) {
if (lElement.list[lRq.getData.selection[0]] && lElement.list[lRq.getData.selection[0]].node.childVals) {
table : (response === undefined) ? [] : flattenResponseElement(response.list, aFullTableSelection.depth, 0, aFullTableSelection.parents, aFullTableSelection.path.slice(1))
return flat.concat([parents.concat([{"val": toFlatten.node.val}].concat(flattenResponseElement(toFlatten.node.childVals, limit, depth + 1, [], path)))]);
return flat.concat(flattenResponseElement([toFlatten.node.childVals[path[depth]]], limit, depth + 1, parents.concat([{"val": toFlatten.node.val}]), path));
return flat.concat(flattenResponseElement(toFlatten.node.childVals, limit, depth + 1, parents.concat([{"val": toFlatten.node.val}]), path));
console.error("flattenResponseElement met an unexpected condition. Reason: The response object is nonconformant OR not all parents have a selection!");