Commit 02c240fc authored by sbade's avatar sbade

updated code for mandatory filter field and dynamic url for servlet.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96941 ce508802-f39f-4f6c-b175-0d175dae99d5
parent bc408c3a
......@@ -126,10 +126,8 @@ public class ChartCreator
{
currentvalue = (fetchRowWiseVal.get(yAxisColunList.get(yCnt)).toString().replace('"', ' ').trim());
valueList.add(currentvalue);
}
allDataMap.put(key, valueList);
}
allDataMap.put(key, valueList);
key = "";
}
valueMapSet = allDataMap.keySet();
......
......@@ -96,29 +96,30 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
int count=0;
for(int jRowCtr=0;jRowCtr<jsonObjData.size();jRowCtr++)
{
rowData = new HashMap<Integer, E12CustomTextCell.CellData> ();
for (String graphKey : graphDataMap.keySet())
rowData = new HashMap<Integer, E12CustomTextCell.CellData> ();
for (String graphKey : graphDataMap.keySet())
{
graphDtlList = graphDataMap.get(graphKey);
jsonEachRow = new JSONObject();
jsonEachRow = (JSONObject)jsonObjData.get(""+jRowCtr);
count=rowData.size();
for(int jDataCtr=0;jDataCtr<graphDtlList.size();jDataCtr++)
{
graphDtlList = graphDataMap.get(graphKey);
jsonEachRow = new JSONObject();
jsonEachRow = (JSONObject)jsonObjData.get(""+jRowCtr);
// Window.alert("jsonEachRow:"+jsonEachRow);
count=rowData.size();
for(int jDataCtr=0;jDataCtr<graphDtlList.size();jDataCtr++)
{
celldata = new E12CustomTextCell.CellData((""+jsonEachRow.get(""+graphDtlList.get(jDataCtr))).replace('"', ' '));
celldata.setMandatory(true);
celldata.setOriginalText("Cell"+jDataCtr);
celldata.setName(""+(graphDtlList.get(jDataCtr)).replace('"', ' '));
rowData.put(count, celldata);
count++;
}
}
rowDataGrid = new DataGridTableRowModel(rowData);
dataGridTableRowList.add(rowDataGrid);
if(jsonEachRow.get(graphDtlList.get(jDataCtr))!=null)
{
celldata = new E12CustomTextCell.CellData((""+jsonEachRow.get(""+graphDtlList.get(jDataCtr))).replace('"', ' '));
celldata.setMandatory(true);
celldata.setOriginalText("Cell"+jDataCtr);
celldata.setName(""+(graphDtlList.get(jDataCtr)).replace('"', ' '));
rowData.put(count, celldata);
count++;
}
}
}
rowDataGrid = new DataGridTableRowModel(rowData);
dataGridTableRowList.add(rowDataGrid);
}
ColumnInfoBean columnInfoBean=null;
graphDataMap =gridNGraphMeataDataMap.get("columnName"+componentId);
......@@ -157,7 +158,6 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
{
final int noOfRows = dataGridTableRowList.size();
final int noOfColumns = dataGridTableColList.size();
dataProvider.setList( dataGridTableRowList );
//Add by Dnyaneshwar chavan on 07-DEC-2012 [WS2GSUN002 || ] Start
E12CustomColumn firstColumn = null;
......@@ -176,8 +176,7 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
final ListHandler<DataGridTableRowModel> sortHandler = new ListHandler<DataGridTableRowModel>( dataProvider.getList())
{
@Override
public void onColumnSort(ColumnSortEvent event)
{
public void onColumnSort(ColumnSortEvent event) {
super.onColumnSort(event);
dataProvider.refresh();
}
......@@ -252,7 +251,6 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
final SimplePager displayPager = new SimplePager(SimplePager.TextLocation.CENTER, displayPagerResources, false, 0 , true, excelBtnPnl);
displayPager.setDisplay(this);
displayPager.setRangeText(rangeText);
Label labelNoDataFound = new Label("No Data Found");
Command setRowCmd = new Command() {
@Override
public void execute()
......@@ -284,16 +282,7 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
if(caption.trim().length()!=0)
{
flexTable.setText(0, 0, caption);
if(noOfRows<=0)
{
flexTable.setWidget(1, 0, labelNoDataFound);
}else
{
flexTable.setWidget(1, 0, this);
}
//flexTable.setWidget(1, 0, this);
flexTable.setWidget(1, 0, this);
flexTable.setWidget(2, 0, displayPager);
flexTable.getCellFormatter().setStyleName(0 ,0 , "FlexTable-ColumnHeaderCell");
flexTable.getCellFormatter().setStyleName(1 ,0 , "gwt-ScrollTable");
......@@ -309,15 +298,7 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
}else
{
if(noOfRows<=0)
{
flexTable.setWidget(0, 0, labelNoDataFound);
}else
{
flexTable.setWidget(0, 0, this);
}
//flexTable.setWidget(0, 0, this);
flexTable.setWidget(0, 0, this);
flexTable.setWidget(1, 0, displayPager);
flexTable.getCellFormatter().setStyleName(0 ,0 , "gwt-ScrollTable");
......@@ -331,18 +312,15 @@ public class CustomGrid extends AbstractDataGrid<DataGridTableRowModel>
}
}
/*flexTable.setHeight( Window.getClientHeight() - 195 + "px" );
setHeight( Window.getClientHeight() - 240+ "px" );
setHeight( ( ( Window.getClientHeight() - 250 ))+ "px" );*/
flexTable.setHeight("330px");
setHeight("330px");
flexTable.setHeight( Window.getClientHeight() - 240 + "px" );
flexTable.setHeight("320px");
setHeight("320px");
/*setHeight( Window.getClientHeight() - 207+ "px" );*/
/*setHeight( ( ( Window.getClientHeight() - 250 ))+ "px" );*/
/*flexTable.setHeight( Window.getClientHeight() - 225 + "px" );
setHeight( Window.getClientHeight() - 207+ "px" );
setHeight( ( ( Window.getClientHeight() - 215 ))+ "px" );*/
//flexTable.setHeight("320px");
//setHeight( ( ( Window.getClientHeight() - 350 ))+ "px" );
//addStyleName("e12AdvDataGrid-SideBars");
addStyleName("e12AdvDataGrid-SideBars");
return flexTable;
}
......
......@@ -245,8 +245,13 @@ public class FilterCreator extends Composite
mainPopupPnl.setPopupPosition(100, 60);
mainPopupPnl.getElement().setId("filterMainOuterDiv");
mainPopupPnl.add(homePgFltrPopupVPnl);
mainPopupPnl.show();
//mainPopupPnl.show();
/* stat--added new code to hide empty filter onload dated : 03-Dec-2014*/
if(popUpHPnl.getWidgetCount()!=0)
{
mainPopupPnl.show();
}
/* End-- added new code to hide empty filter onload*/
cancelimage.addClickHandler(new ClickHandler()
{
@Override
......@@ -593,7 +598,7 @@ public class FilterCreator extends Composite
parameterValue = paramtrArray[paramtrCnt];
if (parameterValue.trim().equalsIgnoreCase(colData.trim()))
{
RadioButton radioBtnOnLod = (RadioButton) flexTable.getWidget(Integer.parseInt(row) + 1, 0);
RadioButton radioBtnOnLod = (RadioButton)flexTable.getWidget(Integer.parseInt(row) + 1, 0);
radioBtnOnLod.setValue(true);
}
}
......@@ -821,6 +826,7 @@ public class FilterCreator extends Composite
private void getFltrSelectedData(ArrayList<FilterInfo> filterList, PopupPanel mainPopupPnl)
{
boolean isFilterNotSelected = false;
int row = 0;
FlexTable grid = null;
......@@ -838,12 +844,13 @@ public class FilterCreator extends Composite
HorizontalPanel horizontalPanel = null;
VerticalPanel verticalPanel = null;
String colNameId = "";
String mandatotyFilter = "";
for (int i = 0; i < filterList.size(); i++)
{
fltrInfo = filterList.get(i);
colName = fltrInfo.getColName();
colNameId = fltrInfo.getColNameId();
mandatotyFilter = fltrInfo.getMandatory();
for (int scrlPnlCnt = 0; scrlPnlCnt < popUpHPnl.getWidgetCount(); scrlPnlCnt++)
{
......@@ -875,21 +882,21 @@ public class FilterCreator extends Composite
}
if (scrollPnl.getTitle().equals(colName))
{
//if (selectedChkBoxBuffer.toString().trim().length() != 0)
if (selectedChkBoxBuffer.toString()!= null)
if (selectedChkBoxBuffer.toString().trim().length() != 0)
//if (selectedChkBoxBuffer.toString()!= null)
{
popUpSendDtatList.add(selectedChkBoxBuffer.toString());
} else
{
if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId))
if("Y".equalsIgnoreCase(mandatotyFilter))
{
Window.alert(fltrInfo.getColName() + "Can't Be Empty");
Window.setTitle(windowTitle);
isFilterNotSelected = true;
}
}
}
}
} else if (horizontalPanel.getWidget(0) instanceof TextBox)
......@@ -897,14 +904,14 @@ public class FilterCreator extends Composite
fltrTxtBox = (TextBox) horizontalPanel.getWidget(0);
if (fltrTxtBox.getTitle().equals(colName))
{
//if (!fltrTxtBox.getText().isEmpty())
if (fltrTxtBox.getText()!=null)
if (!fltrTxtBox.getText().isEmpty())
//if (fltrTxtBox.getText()!=null)
{
popUpSendDtatList.add(fltrTxtBox.getText());
} else
{
if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
if("Y".equalsIgnoreCase(mandatotyFilter))
{
Window.alert(fltrInfo.getColName() + "Can't Be Empty");
Window.setTitle(windowTitle);
......@@ -938,19 +945,14 @@ public class FilterCreator extends Composite
}
}
}
//if (selectedChkBoxBuffer.toString().trim().length() != 0)
if (selectedChkBoxBuffer.toString()!= null)
if (selectedChkBoxBuffer.toString().trim().length() != 0)
//if (selectedChkBoxBuffer.toString()!= null)
{
popUpSendDtatList.add(selectedChkBoxBuffer.toString());
} else
{
/*if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) || !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
{
Window.alert(fltrInfo.getColName() + "Can't Be Empty");
Window.setTitle(windowTitle);
isFilterNotSelected = true;
}*/
if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
//if(!"CUST_CODE_SUNUSA".equalsIgnoreCase(colNameId) && !"CUST_CODE_DLV".equalsIgnoreCase(colNameId))
if("Y".equalsIgnoreCase(mandatotyFilter))
{
Window.alert(fltrInfo.getColName() + "Can't Be Empty");
Window.setTitle(windowTitle);
......@@ -961,10 +963,8 @@ public class FilterCreator extends Composite
}
}
}
}
}
}
if (!isFilterNotSelected)
{
......
......@@ -22,7 +22,10 @@ public class FilterInfo
String colNameId = "";
String colModuleName = "";
String filterType = "";
String mandatory = "";
String name = "";
public String getColTitle()
{
return colTitle;
......@@ -92,5 +95,24 @@ public class FilterInfo
{
this.colModuleName = colModuleName;
}
public String getMandatory()
{
return mandatory;
}
public void setMandatory(String mandatory)
{
this.mandatory = mandatory;
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
}
package ibase.client;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
......@@ -14,19 +15,20 @@ import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.SplitLayoutPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
//import com.googlecode.gwtTableToExcel.client.TableToExcelClientBuilder;
import com.google.gwt.user.client.ui.Widget;
/**
*
......@@ -48,12 +50,12 @@ public class GraphComponent extends Composite
final LinkedHashMap<String, JSONObject> dataMap = new LinkedHashMap<String, JSONObject>();
ArrayList<String> parameterList = null;
ArrayList<String> idList = new ArrayList<String>();
HashMap<String, ArrayList<String>> graphCaptioneMap=null;
ArrayList<String> graphCaptionList= new ArrayList<String>();
/**
* This constructor initializes the graph container
* This constructor initializes the graphcontainer
*
*/
public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj)
{
this.jsonObjMetaData = metaDataJsnObj;
......@@ -73,13 +75,33 @@ public class GraphComponent extends Composite
HashMap<String, ArrayList<String>> graphDataMap = null;
HashMap<String, HashMap<String, String>> componentTypeMap = null;
HashMap<String, HashMap<String, String>> datasourceMap = null;
HashMap<String, String> componentMap = null;
ScrollPanel scrlPanel = null;
FlexTable flexTable = null;
String caption = "";
JSONObject graphJson = null;
final String componentType = "componentType";
String compType = "";
String component ="";
HashMap<String, ArrayList<String>> graphTypeMap = null;
String dtSrouce="";
/** Add Code By Dhanendra for No Data Found Msg **/
String parameter="";
boolean isParameter = false;
for (int i = 0; i < parameterList.size(); i++)
{
if(i<parameterList.size()-1 && i!=0)
{
parameter = parameterList.get(i);
if(parameter.trim().length() !=0)
{
isParameter = true;
}
}
}
/** End Code By Dhanendra for No Data Found Msg **/
if (idList.size() > 0)
{
for (int i = 0; i < idList.size(); i++)
......@@ -97,6 +119,9 @@ public class GraphComponent extends Composite
{*/ // for only OTC
for (String componentId : gridNGraphMeataDataMap.keySet())
{
jsonObjFrGraph=new JSONObject();
if(isNumeric(componentId))
{
......@@ -131,12 +156,18 @@ public class GraphComponent extends Composite
}
}
}
else if("T".equalsIgnoreCase(type) && jsonObjFrGraph != null)
else if("T".equalsIgnoreCase(type))
{
if(jsonObjFrGraph != null)
{
RootPanel.get("chartContainer"+componentId).clear();
//RootPanel.get().clear();
ScrollPanel scrlPanel = new ScrollPanel();
FlexTable flexTable = new FlexTable();
scrlPanel = new ScrollPanel();
flexTable = new FlexTable();
if ("FlexTable".equalsIgnoreCase(component))
{
......@@ -154,6 +185,7 @@ public class GraphComponent extends Composite
scrlPanel.add(flexTable);
scrlPanel.setStyleName("flextableScrlPnl");
// RootPanel.get("chartContainergrid").add(scrlPanel);
RootPanel.get("chartContainer"+componentId).add(scrlPanel);
RootPanel.get("chartContainer"+componentId).add(horizontalPnl);
......@@ -162,18 +194,42 @@ public class GraphComponent extends Composite
flexTable = new FlexTable();
CustomGrid data = new CustomGrid(10);
flexTable = data.jsonToArrayList(gridNGraphMeataDataMap, jsonObjFrGraph,dtSrouce,componentId);
//This Block for Export to excel and PDF formate
HorizontalPanel horizontalPnl = new HorizontalPanel();
Button excelBtn = new Button("Export To Excel");
excelBtn.setTitle("Excel");
/*Button pdFBtn = new Button("Export To PDF");
pdFBtn.setTitle("PDF");
horizontalPnl.add(ibase.client.tabletoexcel.TableToExcelClientBuilder.fromTable(flexTable).withWidget(pdFBtn).buildExportFormWidget());*/
//horizontalPnl.add(ibase.client.tabletoexcel.TableToExcelClientBuilder.fromTable(flexTable).withWidget(excelBtn).buildExportFormWidget());
//End Block for Export to excel and PDF formate
RootPanel.get("chartContainer"+componentId).add(flexTable);
//RootPanel.get("chartContainer"+componentId).add(horizontalPnl);
}
}
}
/** Start Code By Dhanendra for No Data Found Msg - 08 Dec 2014 **/
else
{
RootPanel.get("chartContainer"+componentId).clear();
if(isParameter)
{
flexTable = new FlexTable();
graphCaptionList.clear();
graphCaptioneMap = gridNGraphMeataDataMap.get("componentCaption"+componentId);
graphCaptionList.add(""+graphCaptioneMap.get("componentCaption"+componentId));
caption = graphCaptionList.get(0);
Label labelNoDataFound = new Label("No Data Found");
if(caption !=null && caption.trim().length()>0)
{
flexTable.setText(0, 0, caption);
flexTable.setWidget(1, 0, labelNoDataFound);
flexTable.getCellFormatter().setStyleName(0 ,0 , "FlexTable-ColumnHeaderCell");
flexTable.getCellFormatter().setStyleName(1 ,0 , "gwt-ScrollTable");
}else
{
flexTable.setWidget(0, 0, labelNoDataFound);
flexTable.getCellFormatter().setStyleName(0 ,0 , "gwt-ScrollTable");
}
flexTable.setStyleName("flexCSS");
RootPanel.get("chartContainer"+componentId).add(flexTable);
}
}
/** End Code By Dhanendra for No Data Found Msg **/
}
}
}
......@@ -206,6 +262,7 @@ public class GraphComponent extends Composite
public void getDataMap(final LinkedHashMap<String, ArrayList<String>> datsSourceDtlMap)
{
final LinkedHashMap<String, JSONObject> componentDataMap = new LinkedHashMap<String, JSONObject>();
ArrayList<FilterInfo> filterList = new MetaDataDtl().getFilters(jsonObjMetaData);
for (Map.Entry<String, ArrayList<String>> entry : datsSourceDtlMap.entrySet())
{
final String key = entry.getKey();
......@@ -213,54 +270,53 @@ public class GraphComponent extends Composite
String dbDataSource = values.get(0);
String servletname = values.get(1);
String objActionPath = "";
String page = parameterList.get(0);
String append="";
/****Start Add For SUN Dashboard****/
if (page.equals("sales"))
String page = parameterList.get(0);
FilterInfo filterInfo = null;
/** Start Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/
objActionPath = "/ibase/" + servletname;
int cnt=0;
for (int i = 0; i < filterList.size(); i++)
{
objActionPath = "/ibase/" + servletname + "?month=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
cnt++;
filterInfo = filterList.get(i);
if(i==0)
{
objActionPath=objActionPath + "?" + filterInfo.getName()+"="+parameterList.get(cnt);
}else
{
objActionPath=objActionPath + "&" + filterInfo.getName()+"="+parameterList.get(cnt);
}
}
else if (page.equals("expense"))
objActionPath=objActionPath+"&dataSourceName=" + dbDataSource + "&reportName="+page;
/** End Added New code By sachin for Creating Dynamic Url For Report on 04/12/14**/
/*if (page.equals("sales"))
{
objActionPath = "/ibase/" + servletname + "?month=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("topbrand"))
} else if (page.equals("expense"))
{
objActionPath = "/ibase/" + servletname + "?topNos=" + parameterList.get(1) + "&month=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("recall"))
{
objActionPath = "/ibase/" + servletname + "?lastMonth=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("rcp"))
{
objActionPath = "/ibase/" + servletname + "?dataSourceName=" + dbDataSource + "&days=" + parameterList.get(1);
}
else if (page.equals("qc"))
objActionPath = "/ibase/" + servletname + "?month=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
} else if (page.equals("topbrand"))
{
objActionPath = "/ibase/" + servletname + "?geoLocation=" + parameterList.get(1) + "&month=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("bspl"))
objActionPath = "/ibase/" + servletname + "?topNos=" + parameterList.get(1) + "&month=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource;
} else if (page.equals("bspl"))
{
objActionPath = "/ibase/" + servletname + "?sitecode=" + parameterList.get(1) + "&acctprd=" + parameterList.get(2) + "&prdfrom=" + parameterList.get(3) + "&prdto=" + parameterList.get(4) + "&formatcode=" + parameterList.get(5) + "&reporttype=" + parameterList.get(6) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("msrscore"))
} else if (page.equals("msrscore"))
{
objActionPath = "/ibase/" + servletname + "?territory=" + parameterList.get(1) + "&salesperson=" + parameterList.get(2) + "&month=" + parameterList.get(3) + "&year=" + parameterList.get(4) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("dqsa"))
{
objActionPath = "/ibase/" + servletname + "?&dataSourceName=" + dbDataSource+ "&reportName="+page;
}
else if (page.equals("customerinfo"))
} else if (page.equals("dqsa"))
{
objActionPath = "/ibase/" + servletname + "?custCode=" + parameterList.get(1) + "&prdCode=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource+"&reportName="+page;
}
else if (page.equals("ordershipment"))
{
objActionPath = "/ibase/" + servletname + "?lastMonth=" + parameterList.get(1)+"&siteCode=" + parameterList.get(2) + "&custCode=" + parameterList.get(3) + "&custCodeDlv=" + parameterList.get(4) +"&dataSourceName=" + dbDataSource+"&reportName="+page;
objActionPath = "/ibase/" + servletname + "?&dataSourceName=" + dbDataSource+ "&reportName="+page;
}
/****End Add For SUN Dashboard****/
// start Add dashboard mapping for OTC dashboard on dated 15-oct-2004
......@@ -283,7 +339,31 @@ public class GraphComponent extends Composite
}
//end Add dashboard mapping for OTC dashboard on dated 15-oct-2004
Start Add For SUN Dashboard
else if (page.equals("customerinfo"))
{
objActionPath = "/ibase/" + servletname + "?custCode=" + parameterList.get(1) + "&prdCode=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource+"&reportName="+page;
}
else if (page.equals("ordershipment"))
{
objActionPath = "/ibase/" + servletname + "?lastMonth=" + parameterList.get(1)+"&siteCode=" + parameterList.get(2) + "&custCode=" + parameterList.get(3) + "&custCodeDlv=" + parameterList.get(4) +"&dataSourceName=" + dbDataSource+"&reportName="+page;
}
End For SUN Dashboard
Start Add For MFG SUN Dashboard
else if (page.equals("recall"))
{
objActionPath = "/ibase/" + servletname + "?lastMonth=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("rcp"))
{
objActionPath = "/ibase/" + servletname + "?lastMonth=" + parameterList.get(1) + "&dataSourceName=" + dbDataSource;
}
else if (page.equals("qc"))
{
objActionPath = "/ibase/" + servletname + "?geoLocation=" + parameterList.get(1) + "&lastMonth=" + parameterList.get(2) + "&dataSourceName=" + dbDataSource;
}*/
/*END For MFG SUN Dashboard*/
RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath);
try
{
......@@ -294,16 +374,23 @@ public class GraphComponent extends Composite
{
if (STATUS_CODE_OK == response.getStatusCode())
{
if (response.getText().trim().length() > 2) //if code is relese to OTC then Comment this if condition Dhanendra 07Nov2014
{
JSONObject servletJsnObj = (JSONObject) JSONParser.parseStrict(response.getText());
JSONObject jsonObjData = new JSONObject();
jsonObjData.put(key, servletJsnObj);
componentDataMap.put(key, jsonObjData);
if (componentDataMap.size() == datsSourceDtlMap.size())
{
buildChart(componentDataMap);
}
}else
{
componentDataMap.put(key, null);
RootPanel.get("chartContainer"+key).clear();
}
if (componentDataMap.size() == datsSourceDtlMap.size())
{
buildChart(componentDataMap);
}
} else
{
......@@ -321,11 +408,12 @@ public class GraphComponent extends Composite
{
e.printStackTrace();
}
}
}
public boolean isNumeric(String s) {
public boolean isNumeric(String s) {
return s.matches("[-+]?\\d*\\.?\\d+");
}
}
......@@ -538,6 +538,11 @@ public class MetaDataDtl
filterInfo.setColName(columNode.getChildNodes().item(0).getNodeValue());
filterInfo.setColNameId(columNode.getAttributes().getNamedItem("id").getNodeValue());
filterInfo.setColModuleName(columNode.getAttributes().getNamedItem("moduleName").getNodeValue());
/*Add Dhanendra For 2 Attribute in Metaxml 8Dec2014*/
filterInfo.setName(columNode.getAttributes().getNamedItem("name").getNodeValue());
filterInfo.setMandatory(columNode.getAttributes().getNamedItem("mandatory").getNodeValue());
/*End Dhanendra For 2 Attribute in Metaxml 8Dec2014*/
}
if ("col_descr".equals(columNode.getNodeName()))
{
......
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