Commit fa0d3eda authored by pborate's avatar pborate

Updated changes in dashboardUtil class for column

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@191457 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e15c5fa5
......@@ -422,7 +422,7 @@ public class DashboardUtil
else
{
JSONObject columsArray=columsObj.optJSONObject("columns");
System.out.println("columsArray>>>>>>else"+columsArray);
System.out.println("columsArray>>>>>>else:::::"+columsArray);
JSONObject columArray=columsArray.optJSONObject("column");
JSONArray colArray = new JSONArray();
colArray.put(columArray);
......@@ -464,11 +464,14 @@ public class DashboardUtil
System.out.println("columnGroup else>>>>>>>>>"+columnGroupObj);
JSONArray columnsArray =columnGroupObj.optJSONArray("columns");
System.out.println("columnsArray else>>>>>>>>>"+columnsArray);
JSONArray columnArr=new JSONArray();
if(columnsArray != null ) {
for(int i = 0, sizeColumns = columnsArray.length(); i < sizeColumns; i++) {
JSONObject columsArrayObj=columnsArray.optJSONObject(i);
JSONObject columArray=columsArrayObj.optJSONObject("column");
System.out.println("columArray>>>>>>"+columArray);
columnArr.put(columArray);
columnGroupObj.put("columns", columnArr);
System.out.println("columArray>>>>>>:::::"+columArray);
if(columArray != null) {
String id=columArray.optString("id");
String value=columArray.optString("value");
......@@ -489,13 +492,16 @@ public class DashboardUtil
}
else {
JSONObject columsArray=columnGroupObj.optJSONObject("columns");
System.out.println("columsArray>>>>>>else"+columsArray);
JSONObject columArray=columsArray.optJSONObject("column");
System.out.println("columArray>>>>>> else"+columArray);
if(columArray != null) {
String id=columArray.optString("id");
String value=columArray.optString("value");
String width=columArray.optString("width");
System.out.println("columsArray>>>>>>else ELSE"+columsArray);
JSONObject columObj=columsArray.optJSONObject("column");
JSONArray columnArrayFinal=new JSONArray();
columnArrayFinal.put(columObj);
columnGroupObj.put("columns", columnArrayFinal);
System.out.println("columArray>>>>>> else"+columObj);
if(columObj != null) {
String id=columObj.optString("id");
String value=columObj.optString("value");
String width=columObj.optString("width");
finalData.put("uniqueName", id);
finalData.put("caption", value);
......@@ -504,9 +510,22 @@ public class DashboardUtil
finalData.put("width", width);
}
idx++;
}
System.out.println("finalData>>>>>>"+finalData);
finalDataArray.put(finalData);
}
else {
JSONArray columArray=columsArray.optJSONArray("column");
JSONArray columnArrayNew=new JSONArray();
for(int z = 0, sizeCol = columArray.length(); z < sizeCol; z++) {
System.out.println("inside elese of column array "+columArray);
JSONObject columArry=columArray.optJSONObject(z);
columnArrayNew.put(columArry);
System.out.println("column array new "+columnArrayNew);
}
columnGroupObj.put("columns", columnArrayNew);
System.out.println("columns array >>>>>>>>>"+columnGroupObj);
}
System.out.println("finalDataArray::::::::"+finalDataArray);
}
componentData.put("columns", finalDataArray);
......@@ -514,7 +533,7 @@ public class DashboardUtil
}
//componentData.remove("column_group");
System.out.println("componentData::::::::"+componentData);
System.out.println("componentData final::::::::"+componentData);
// finalDataObj=getPivotTableData(componentData);
return componentData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment