Commit dfaa9955 authored by nsawalakhe's avatar nsawalakhe

Pass cell value as parameter in method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@39806 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 53f97e25
...@@ -88,12 +88,15 @@ public class GraphComponent extends Composite ...@@ -88,12 +88,15 @@ public class GraphComponent extends Composite
//final ArrayList<FilterInfo> filterList = metaDataDtl.getFilters(metaDataJsnObj); //final ArrayList<FilterInfo> filterList = metaDataDtl.getFilters(metaDataJsnObj);
// add variable by swati // add variable by swati
String empCodeEpa=""; String empCodeEpa="";
String cellVal="";
String isShowfilter="";
public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj,String showfilter) public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj,String showfilter)
{ {
userMail = Window.Location.getParameter("EMP_MAILCODE") == null ? "" : Window.Location.getParameter("EMP_MAILCODE"); userMail = Window.Location.getParameter("EMP_MAILCODE") == null ? "" : Window.Location.getParameter("EMP_MAILCODE");
reportCaption= Window.Location.getParameter("GEO_LOCATION") == null ? "" : Window.Location.getParameter("GEO_LOCATION"); reportCaption = Window.Location.getParameter("GEO_LOCATION") == null ? "" : Window.Location.getParameter("GEO_LOCATION");
empCodeEpa= Window.Location.getParameter("EMP_CODE") == null ? "" : Window.Location.getParameter("EMP_CODE"); empCodeEpa = Window.Location.getParameter("EMP_CODE") == null ? "" : Window.Location.getParameter("EMP_CODE");
String isShowfilter= Window.Location.getParameter("FLAG"); isShowfilter = Window.Location.getParameter("FLAG");
cellVal = Window.Location.getParameter("CELL_VAL")== null ? "" : Window.Location.getParameter("CELL_VAL");
this.jsonObjMetaData = metaDataJsnObj; this.jsonObjMetaData = metaDataJsnObj;
this.parameterList = parameterList; this.parameterList = parameterList;
mainContainer.setWidth("100%"); mainContainer.setWidth("100%");
...@@ -295,7 +298,7 @@ public class GraphComponent extends Composite ...@@ -295,7 +298,7 @@ public class GraphComponent extends Composite
if(componentId.equals("1")) if(componentId.equals("1"))
{ {
rawDataMapJsonOuter = getDataMapJson(dataJsn, groupNameList.get(0),graphDtlList); rawDataMapJsonOuter = getDataMapJson(dataJsn, groupNameList.get(0),graphDtlList);
//Window.alert("rawDataMapJsonOuter :"+rawDataMapJsonOuter);
grpNameList.add(groupNameList.get(0)); grpNameList.add(groupNameList.get(0));
}else{ }else{
if(jsonAftrFltr.size() == 0) if(jsonAftrFltr.size() == 0)
...@@ -321,7 +324,7 @@ public class GraphComponent extends Composite ...@@ -321,7 +324,7 @@ public class GraphComponent extends Composite
if(rawDataMapJsonOuter.size() > 0) if(rawDataMapJsonOuter.size() > 0)
{ {
/*Add uniqueId parameter in getDisplayData method to random component id by Dhanendra on Date 09-11-2015 */ /*Add uniqueId parameter in getDisplayData method to random component id by Dhanendra on Date 09-11-2015 */
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList,firstNameforTitle,uniqueId); getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList,firstNameforTitle,uniqueId,cellVal);
} }
} }
else{ else{
...@@ -356,11 +359,13 @@ public class GraphComponent extends Composite ...@@ -356,11 +359,13 @@ public class GraphComponent extends Composite
/*End uniqueId to Graph by Dhanendra on date 10-11-2015*/ /*End uniqueId to Graph by Dhanendra on date 10-11-2015*/
/*added code to append x-axis value in child grpah in title by dhanendra on Date: 07-Dec-2015*/ /*added code to append x-axis value in child grpah in title by dhanendra on Date: 07-Dec-2015*/
Label componantTtl=null; Label componantTtl=null;
if(empCodeEpa.length()>0) if(empCodeEpa.length()>0)
{ {
componantTtl = new Label(componantTitlNameList.get(0)+" : "+empCodeEpa); componantTtl = new Label(componantTitlNameList.get(0)+" : "+empCodeEpa);
}else }
else
{ {
componantTtl = new Label(componantTitlNameList.get(0)); componantTtl = new Label(componantTitlNameList.get(0));
} }
...@@ -717,7 +722,14 @@ public class GraphComponent extends Composite ...@@ -717,7 +722,14 @@ public class GraphComponent extends Composite
Image gridTtlImg = new Image("FusionChart/images/"+gridIconName); Image gridTtlImg = new Image("FusionChart/images/"+gridIconName);
HorizontalPanel gridTtlPanel = new HorizontalPanel(); HorizontalPanel gridTtlPanel = new HorizontalPanel();
if(cellVal.trim().length()>0)
{
gridComponantTitleName = ""+componantTitlNameList.get(0)+": "+cellVal;
}
else
{
gridComponantTitleName = ""+componantTitlNameList.get(0); gridComponantTitleName = ""+componantTitlNameList.get(0);
}
gridCssName = ""+groupCssTypeNameList.get(0); gridCssName = ""+groupCssTypeNameList.get(0);
gridTitleLbl = new Label(gridComponantTitleName); gridTitleLbl = new Label(gridComponantTitleName);
gridTtlImg.setStyleName("componantTtlImg"); gridTtlImg.setStyleName("componantTtlImg");
...@@ -1079,7 +1091,7 @@ public class GraphComponent extends Composite ...@@ -1079,7 +1091,7 @@ public class GraphComponent extends Composite
} }
if(rawDataMapJsonOuter.size() > 0) if(rawDataMapJsonOuter.size() > 0)
{ {
getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList, firstNameforTitle,""); getDisplayData(rawDataMapJsonOuter, graphDtlList, groupCssTypeNameList.get(0), width, height, imageName,refCompIdMap,mainDataJsn,groupNameList.get(0),filterList, firstNameforTitle,"",cellVal);
} }
} }
}/*end Code for display Dashboard one by one in one page by Dhanendra*/ }/*end Code for display Dashboard one by one in one page by Dhanendra*/
...@@ -1615,6 +1627,9 @@ public class GraphComponent extends Composite ...@@ -1615,6 +1627,9 @@ public class GraphComponent extends Composite
else if(groupName.contains("rep")) else if(groupName.contains("rep"))
{ {
designation = "repdesg"; designation = "repdesg";
}else
{
designation = groupName;
} }
designation= fetchRowWiseValJsn.get(designation).toString().replace("\"", "").trim(); designation= fetchRowWiseValJsn.get(designation).toString().replace("\"", "").trim();
repNonReportDash = fetchRowWiseValJsn.get(xAxixNameList.get(0)).toString().replace("\"", "").trim(); repNonReportDash = fetchRowWiseValJsn.get(xAxixNameList.get(0)).toString().replace("\"", "").trim();
...@@ -1801,7 +1816,7 @@ public class GraphComponent extends Composite ...@@ -1801,7 +1816,7 @@ public class GraphComponent extends Composite
/*Add uniqueId to groupName and add uniqueId parameter to getDisplayData by Dhanendra On Date 10-11-2015*/ /*Add uniqueId to groupName and add uniqueId parameter to getDisplayData by Dhanendra On Date 10-11-2015*/
getClearDiv(groupName+uniqueId); getClearDiv(groupName+uniqueId);
getDisplayData(fltrAfterDataJson, graphDtlList, groupCssList.get(0), width, height, imageName, refrshMapVal, mainDataJson,groupName,filterList, firstNameforTitle,uniqueId); getDisplayData(fltrAfterDataJson, graphDtlList, groupCssList.get(0), width, height, imageName, refrshMapVal, mainDataJson,groupName,filterList, firstNameforTitle,uniqueId,cellVal);
/*End uniqueId to groupName and add uniqueId parameter to getDisplayData by Dhanendra On Date 10-11-2015*/ /*End uniqueId to groupName and add uniqueId parameter to getDisplayData by Dhanendra On Date 10-11-2015*/
} }
...@@ -1849,16 +1864,26 @@ public class GraphComponent extends Composite ...@@ -1849,16 +1864,26 @@ public class GraphComponent extends Composite
} }
/*Add firstNameforTitle parameter by Dhanendra on date 21-10-2015*/ /*Add firstNameforTitle parameter by Dhanendra on date 21-10-2015*/
/*Add uniqueId parameter by Dhanendra on date 09-11-2015*/ /*Add uniqueId parameter by Dhanendra on date 09-11-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, final String uniqueId) 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, final String uniqueId,String cellVal)
{ {
int dataCnt = 0; int dataCnt = 0;
JSONObject graphJson = null; JSONObject graphJson = null;
ArrayList<String> componantTtlList = new ArrayList<String>(); ArrayList<String> componantTtlList = new ArrayList<String>();
//final ArrayList<String> linkProperties=graphDtlList.get(15);
//Window.alert("linkProperties: "+linkProperties);
componantTtlList = (ArrayList<String>)graphDtlList.get(18); componantTtlList = (ArrayList<String>)graphDtlList.get(18);
HorizontalPanel hPanel = null; HorizontalPanel hPanel = null;
Image lableImg = null; Image lableImg = null;
Label componantTtl = new Label(componantTtlList.get(0) + ":" + firstNameforTitle.replace("\"", "")); Label componantTtl =null;
if(cellVal.length()>0)
{
componantTtl = new Label(componantTtlList.get(0) + " : " + firstNameforTitle.replace("\"", "")+cellVal);
}
else
{
componantTtl = new Label(componantTtlList.get(0) + ":" + firstNameforTitle.replace("\"", ""));
}
Image componantTtlImg = new Image("FusionChart/images/reportswht.png"); Image componantTtlImg = new Image("FusionChart/images/reportswht.png");
Image refreshImg = new Image("FusionChart/images/refresh.png"); Image refreshImg = new Image("FusionChart/images/refresh.png");
...@@ -1935,9 +1960,9 @@ public class GraphComponent extends Composite ...@@ -1935,9 +1960,9 @@ public class GraphComponent extends Composite
{ {
/*Add if else condition to open a new window by Dhanendra on Date 16-10-2015*/ /*Add if else condition to open a new window by Dhanendra on Date 16-10-2015*/
e12LoadImg.setLoading(true); e12LoadImg.setLoading(true);
if(groupName.equalsIgnoreCase("repname")) if(groupName.equalsIgnoreCase("repname") || groupName.equalsIgnoreCase("prd_name"))
{ {
getOnClickOpenGrid(personName.trim(),filterList); getOnClickOpenGrid(personName.trim(),filterList, groupName);
}else }else
{ {
getOnClickFltrDataJson(mainDataJsonCopy, personName.trim(),refrshMap,groupCssTypeName, width, height, imageName,filterList,uniqueId); getOnClickFltrDataJson(mainDataJsonCopy, personName.trim(),refrshMap,groupCssTypeName, width, height, imageName,filterList,uniqueId);
...@@ -1952,9 +1977,9 @@ public class GraphComponent extends Composite ...@@ -1952,9 +1977,9 @@ public class GraphComponent extends Composite
{ {
/*Add if else condition to open a new window by Dhanendra on Date 16-10-2015*/ /*Add if else condition to open a new window by Dhanendra on Date 16-10-2015*/
e12LoadImg.setLoading(true); e12LoadImg.setLoading(true);
if(groupName.equalsIgnoreCase("repname")) if(groupName.equalsIgnoreCase("repname") || groupName.equalsIgnoreCase("prd_name"))
{ {
getOnClickOpenGrid(personName.trim(),filterList); getOnClickOpenGrid(personName.trim(),filterList,groupName);
}else }else
{ {
getOnClickFltrDataJson(mainDataJsonCopy, personName.trim(),refrshMap,groupCssTypeName, width, height, imageName,filterList,uniqueId); getOnClickFltrDataJson(mainDataJsonCopy, personName.trim(),refrshMap,groupCssTypeName, width, height, imageName,filterList,uniqueId);
...@@ -2032,8 +2057,10 @@ public class GraphComponent extends Composite ...@@ -2032,8 +2057,10 @@ public class GraphComponent extends Composite
/*End This method for get time by Dhanendra on 23/06/2015*/ /*End This method for get time by Dhanendra on 23/06/2015*/
/*Add this method to open a new window to display a grid from click on last hierachey by Dhanendra on date 16-10-2015 */ /*Add this method to open a new window to display a grid from click on last hierachey by Dhanendra on date 16-10-2015 */
private void getOnClickOpenGrid(String personName,ArrayList<FilterInfo> filterList) private void getOnClickOpenGrid(String personName,ArrayList<FilterInfo> filterList, String groupName)//,ArrayList<String> linkProperties
{ {
//String linkPropertiesStr = linkProperties.get(0);
//Window.alert("linkPropertiesStr:::::"+linkPropertiesStr);
int count = 0; int count = 0;
String propertyStr = ""; String propertyStr = "";
for (FilterInfo filterInfo : filterList) for (FilterInfo filterInfo : filterList)
...@@ -2048,8 +2075,13 @@ public class GraphComponent extends Composite ...@@ -2048,8 +2075,13 @@ public class GraphComponent extends Composite
} }
count++; count++;
} }
if(groupName.equalsIgnoreCase("repname"))
{
Window.open("/ibase/dwh/GwtDashboardPage.html?metadataname=compliancegrid&personName="+personName+propertyStr+"&FLAG=N", "_blank", "menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=550,width=800,top=100,left=300"); Window.open("/ibase/dwh/GwtDashboardPage.html?metadataname=compliancegrid&personName="+personName+propertyStr+"&FLAG=N", "_blank", "menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=550,width=800,top=100,left=300");
}else if(groupName.equalsIgnoreCase("prd_name"))
{
Window.open("/ibase/dwh/GwtDashboardPage.html?metadataname=employeedetails&personName="+personName+propertyStr+"&FLAG=N", "_blank", "menubar=no,toolbar=no,location=no,resizable=yes,scrollbars=yes,status=no,height=550,width=800,top=100,left=300");
}
e12LoadImg.setLoading(false); e12LoadImg.setLoading(false);
} }
/*Add this method to open a new window to display a grid from click on last hierachey by Dhanendra on date 16-10-2015 */ /*Add this method to open a new window to display a grid from click on last hierachey by Dhanendra on date 16-10-2015 */
......
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