Commit fe84e9ff authored by dkasliwal's avatar dkasliwal

Create method for display summary at component title panel


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104934 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c065672e
......@@ -143,6 +143,7 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
jsonEachRow = new JSONObject();
jsonEachRow = (JSONObject)jsonObjData.get(""+jRowCtr);
count=rowData.size();
for(int jDataCtr=0;jDataCtr<graphDtlList.size();jDataCtr++)
{
if(jsonEachRow.get(graphDtlList.get(jDataCtr))!=null)
......@@ -173,7 +174,7 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
}
celldata.setMandatory(true);
celldata.setOriginalText("Cell"+graphDtlList.size());
celldata.setName("");
//celldata.setName("");
rowData.put(count, celldata);
count++;
rowDataGrid = new DataGridTableRowModel(rowData);
......@@ -1036,4 +1037,33 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
}
}-*/;
/*End Native method for clear div by Dhanendra on date 19-09-2016*/
/*Add method for display summary in component title panel by dhanendra */
public double getSubTitleSummary(JSONObject jsonObjGridData ,String dataSrc,String componentSubTitleProperty)
{
double subTitleValTotal = 0.0;
try
{
JSONObject jsonObjFrGraph =(JSONObject) jsonObjGridData.get(dataSrc);
for (int jsnCnt = 0; jsnCnt < jsonObjFrGraph.size(); jsnCnt++)
{
JSONObject fetchRowWiseVal = (JSONObject) jsonObjFrGraph.get(String.valueOf(jsnCnt));
if(fetchRowWiseVal!=null)
{
if(fetchRowWiseVal.get(componentSubTitleProperty)!=null)
{
subTitleValTotal = subTitleValTotal + Math.round(Double.parseDouble(fetchRowWiseVal.get(componentSubTitleProperty).toString().replace('"', ' ').trim()));
}
}
}
}catch (Exception e) {
CommonUtils.printOnConsole(" Exception :: CustomGrid :: getSubTitleSummary [" + e.getMessage() + "]");
}
return subTitleValTotal;
}
/*End method for display summary in component title panel by dhanendra */
}
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