Commit 570a43ec authored by dkasliwal's avatar dkasliwal

Modify getFltrDataJson method to add in 0 index and one index value to...

Modify getFltrDataJson method to add in 0 index and one index value to firstname value. and getDisplayData method add one firstNameforTitle parameter


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98819 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 183a87fe
......@@ -179,6 +179,12 @@ public class GraphComponent extends Composite
}
}*/
/*Add Veriable by Dhanendra on 20-10-2015*/
String firstNameforTitle = "";
/*Add Veriable by Dhanendra on 20-10-2015*/
/** End Code By Dhanendra for No Data Found Msg **/
if (idList.size() > 0)
......@@ -286,8 +292,16 @@ public class GraphComponent extends Composite
if(jsonAftrFltr.size() == 0)
{
fltrDataJson = getFltrDataJson(dataJsn, grpNameList.get(0),null);
/*Added code by dhanendra for get first Name to display on date 21-10-2015*/
firstNameforTitle = ""+ fltrDataJson.get("0");
fltrDataJson = (JSONObject) fltrDataJson.get("1");
/*Added code by dhanendra for get first Name to display on date 21-10-2015*/
}else{
fltrDataJson = getFltrDataJson(jsonAftrFltr, grpNameList.get(0),null);
/*Added code by dhanendra for get first Name to display on date 21-10-2015*/
firstNameforTitle = ""+ fltrDataJson.get("0");
fltrDataJson = (JSONObject) fltrDataJson.get("1");
/*Added code by dhanendra for get first Name to display on date 21-10-2015*/
}
rawDataMapJsonOuter = getDataMapJson(fltrDataJson, groupNameList.get(0),graphDtlList);
grpNameList = new ArrayList<String>();
......@@ -297,7 +311,7 @@ public class GraphComponent extends Composite
}
if(rawDataMapJsonOuter.size() > 0)
{
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList);
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList,firstNameforTitle);
}
}/*end Code for display Dashboard one by one in one page by Dhanendra*/
......@@ -752,6 +766,11 @@ public class GraphComponent extends Composite
/*End for heading for SS Grid*/
/** Add Code By Dhanendra for No Data Found Msg **/
/*Add Veriable by Dhanendra on 20-10-2015*/
String firstNameforTitle = "";
/*Add Veriable by Dhanendra on 20-10-2015*/
/*String parameter = "";
boolean isParameter = false;
for (int i = 0; i < parameterList.size(); i++)
......@@ -890,7 +909,7 @@ public class GraphComponent extends Composite
}
if(rawDataMapJsonOuter.size() > 0)
{
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList);
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList, firstNameforTitle);
}
}/*end Code for display Dashboard one by one in one page by Dhanendra*/
......@@ -1559,7 +1578,7 @@ public class GraphComponent extends Composite
private JSONObject getFltrDataJson(JSONObject dataJsn, String groupName, String selcetIndex)
{
JSONObject fltrDataJson = new JSONObject();
//Window.alert("groupName :"+groupName+"====selcetIndex :"+selcetIndex);
JSONObject finalFltrDataWithFrstValJson = new JSONObject();
JSONObject fetchRowWiseVal = null;
int count = 0;
String group = "";
......@@ -1568,7 +1587,6 @@ public class GraphComponent extends Composite
{
fetchRowWiseVal = (JSONObject) dataJsn.get(String.valueOf(jsnCnt));
group = fetchRowWiseVal.get(groupName).toString().replace("\"", "").trim();
//Window.alert("group :"+group);
if(selcetIndex == null || selcetIndex.equals(""))
{
if(jsnCnt == 0)
......@@ -1587,8 +1605,13 @@ public class GraphComponent extends Composite
count++;
}
}
//Window.alert("In Filter Method :"+fltrDataJson);
return fltrDataJson;
/*Add zero index and 1 index to send json and first value by Dhanendra on date 21-10-2015*/
finalFltrDataWithFrstValJson.put("0", new JSONString(firstValue));
finalFltrDataWithFrstValJson.put("1", fltrDataJson);
/*Add zero index and 1 index to send json and first value by Dhanendra on date 21-10-2015*/
//return fltrDataJson;
return finalFltrDataWithFrstValJson;
}
@SuppressWarnings("unchecked")
private void getOnClickFltrDataJson(JSONObject mainDataJson, String groupNameVal, HashMap<String, String>refrshMapVal,String groupCssTypeName, String width, String height, String imageName,ArrayList<FilterInfo> filterList)
......@@ -1614,6 +1637,7 @@ public class GraphComponent extends Composite
HashMap<String, JSONObject> avlDateMap =null;
Label gridLblVal =null;
JSONObject filtrGridJSN = null;
String firstNameforTitle = "";
for (int jsnCnt = 0; jsnCnt < dataJsn.size();jsnCnt++)
{
fetchRowWiseVal = (JSONObject) dataJsn.get(String.valueOf(jsnCnt));
......@@ -1656,6 +1680,10 @@ public class GraphComponent extends Composite
nextGroupNameList =(ArrayList<String>) graphDtlList.get(17);
groupCssList = (ArrayList<String>) graphDtlList.get(19);
fltrDataJson = getFltrDataJson(dataJsn, groupName,groupNameVal.trim());
firstNameforTitle = ""+ fltrDataJson.get("0");
fltrDataJson = (JSONObject) fltrDataJson.get("1");
fltrAfterDataJson = getDataMapJson(fltrDataJson, nextGroupNameList.get(0),graphDtlList);
groupName = nextGroupNameList.get(0);
set = fltrAfterDataJson.keySet();
......@@ -1674,7 +1702,7 @@ public class GraphComponent extends Composite
break;
}
getClearDiv(groupName);
getDisplayData(fltrAfterDataJson, graphDtlList, groupCssList.get(0), width, height, imageName, refrshMapVal, mainDataJson,groupName,filterList);
getDisplayData(fltrAfterDataJson, graphDtlList, groupCssList.get(0), width, height, imageName, refrshMapVal, mainDataJson,groupName,filterList, firstNameforTitle);
}
......@@ -1716,7 +1744,8 @@ public class GraphComponent extends Composite
{
this.clearContainer(groupName);
}
private void getDisplayData(final JSONObject mainDataJson,ArrayList<ArrayList<String>> graphDtlList ,final String groupCssTypeName,final String width,final String height,final String imageName,final HashMap<String, String>refrshMap, final JSONObject mainDataJsonCopy, final String groupName, final ArrayList<FilterInfo> filterList)
/*Add firstNameforTitle parameter by Dhanendra on date 21-10-2015*/
private void getDisplayData(final JSONObject mainDataJson,ArrayList<ArrayList<String>> graphDtlList ,final String groupCssTypeName,final String width,final String height,final String imageName,final HashMap<String, String>refrshMap, final JSONObject mainDataJsonCopy, final String groupName, final ArrayList<FilterInfo> filterList, String firstNameforTitle)
{
int dataCnt = 0;
JSONObject graphJson = null;
......@@ -1724,7 +1753,7 @@ public class GraphComponent extends Composite
componantTtlList = (ArrayList<String>)graphDtlList.get(18);
HorizontalPanel hPanel = null;
Image lableImg = null;
Label componantTtl = new Label(componantTtlList.get(0));
Label componantTtl = new Label(componantTtlList.get(0) + ":" + firstNameforTitle.replace("\"", ""));
Image componantTtlImg = new Image("FusionChart/images/reportswht.png");
Image refreshImg = new Image("FusionChart/images/refresh.png");
......
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