Commit 1cff820f authored by sbade's avatar sbade

Added merged source code for all


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100094 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6a0a8983
......@@ -3,7 +3,6 @@ package ibase.client;
import java.util.ArrayList;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.ScrollPanel;
......
......@@ -18,7 +18,6 @@ import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.view.client.ListDataProvider;
import ibase.client.resources.Resources;
/**
* This class is used to show the data in paged format.
......@@ -31,7 +30,6 @@ public class CellTableGridCreator
public CellTableGridCreator() {
// TODO Auto-generated constructor stub
}
ListDataProvider<CellTableGridInfo> dataProvider = new ListDataProvider<CellTableGridInfo>();
......
package ibase.client;
public class CommonUtils
{
public native static void printOnConsole( String value )
/*-{
if( typeof window.console !== "undefined" )
{
console.log( value );
}
}-*/;
}
package ibase.client;
import java.util.ArrayList;
import java.util.ArrayList;
import com.google.gwt.core.client.Callback;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
......
......@@ -27,6 +27,7 @@ import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
import com.google.gwt.user.client.ui.PopupPanel;
......@@ -99,7 +100,6 @@ public class FilterCreator extends Composite
horizontlPnl.add(fltrImgPnl);
}
this.metaDataJsnObj = metaDataJsnObj;
openFltrImg.addClickHandler(new FilterBtnActionHandler());
initWidget(horizontlPnl);
......@@ -224,6 +224,12 @@ public class FilterCreator extends Composite
getAutoCompWithDigitFltr(filterInfo, popUpVPnl, fltrParmtrArray);
}
/* ended */
/* added new filter drop down list 23 sep 2015*/
if (filterInfo.getFiltrType().equals("7"))
{
creatDropDown(filterInfo, popUpVPnl, fltrParmtrArray);
}
/* ended */
}
}
headingLbl.setStyleName("filterDivHeadingName"); //Dhanendra 12-09-2014
......@@ -821,6 +827,7 @@ public class FilterCreator extends Composite
FlexTable grid = null;
CheckBox checkBox = null;
TextBox fltrTxtBox = null;
ListBox fltrListBox= null;
BulletList bulletList = null;
ScrollPanel scrollPnl = null;
ArrayList<String> popUpSendDtatList = new ArrayList<String>();
......@@ -958,7 +965,6 @@ public class FilterCreator extends Composite
if (listItem.getWidget(0) instanceof Paragraph)
{
paragraph = (Paragraph) listItem.getWidget(0);
if (selectedChkBoxBuffer.length() != 0)
{
selectedChkBoxBuffer.append("," + paragraph.getText().trim());
......@@ -988,17 +994,40 @@ public class FilterCreator extends Composite
{
popUpSendDtatList.add("");
popUpSendDtatListDtl.add("");
}
}
}
}
/*added new code to set drop down by swati on 24 sep 2015*/
else if (horizontalPanel.getWidget(0) instanceof ListBox)
{
fltrListBox = (ListBox) horizontalPanel.getWidget(0);
if (fltrListBox.getTitle().equals(colName))
{
if (!fltrListBox.getTitle().isEmpty())
{
popUpSendDtatList.add(""+fltrListBox.getSelectedIndex());
popUpSendDtatListDtl.add(fltrListBox.getItemText(fltrListBox.getSelectedIndex()));
} else
{
if ("Y".equalsIgnoreCase(mandatotyFilter))
{
Window.alert(fltrInfo.getColDescr() + " Can't Be Empty");
Window.setTitle(windowTitle);
isFilterNotSelected = true;
} else
{
popUpSendDtatList.add("");
popUpSendDtatListDtl.add("");
}
}
}
}
/*ended new code to set drop down by swati on 24 sep 2015*/
}
}
}
}
//Window.alert("poupsenddatalist : "+popUpSendDtatList);
if (!isFilterNotSelected)
{
Window.setTitle("");
......@@ -1023,8 +1052,6 @@ public class FilterCreator extends Composite
String filtrEntrdData = "";
String filterDescr = "";
int count = 0;
boolean flag = false;
String temp1 = Window.Location.getHref();
subTitle = temp1.substring(temp1.lastIndexOf('=') + 1, temp1.length());
if (!subTitle.trim().equalsIgnoreCase((metadatName.trim())))
......@@ -1124,6 +1151,7 @@ public class FilterCreator extends Composite
titleLbl.setText(title.get(0)) ;
}
/*End Code for Remove Colon for no Filter by Dhanendra on 31-07-15*/
}
}
......@@ -1181,6 +1209,69 @@ public class FilterCreator extends Composite
addEnterKeyHandler(inputTxtBox);
popUpHPnl.add(outerVPanel);
}
/*added new method for drop down box by swati 23 sep 2015*/
private void creatDropDown(final FilterInfo filterInfo, final VerticalPanel popUpHPnl, final String[] splitedArray)
{
try
{
final ListBox dropDownBox = new ListBox();
Label columnNameLbl = null;
dropDownBox.setTitle(filterInfo.getFieldName());
dropDownBox.setStylePrimaryName("drpDownBoxCss");
VerticalPanel outerVPanel = new VerticalPanel();
HorizontalPanel hPanel = new HorizontalPanel();
VerticalPanel vPanel = new VerticalPanel();
columnNameLbl = new Label("" + filterInfo.getColDescr());
vPanel.add(columnNameLbl);
columnNameLbl.setStyleName("filterHeaderLabel");
vPanel.setStyleName("filterHeaderPanel");
hPanel.add(dropDownBox);
outerVPanel.add(vPanel);
outerVPanel.add(hPanel);
String objActionPath = "/ibase/DashboardFilterServlet?FIELDNAME=" + filterInfo.getFieldName() + "&OBJ_NAME=" + filterInfo.getModName();
RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath);
reqBuilder.sendRequest(null, new RequestCallback()
{
@Override
public void onResponseReceived(Request request, Response response)
{
HashMap<String, ArrayList<String>> drpDwnMap=new HashMap<String, ArrayList<String>>();
String row="";
ArrayList valueList = new ArrayList<String>();
drpDwnMap=getPopUpDataMap(response.getText());
for (Map.Entry<String, ArrayList<String>> entry : drpDwnMap.entrySet())
{
row = entry.getKey();
valueList = entry.getValue();
dropDownBox.addItem(""+valueList.get(1));
dropDownBox.setVisibleItemCount(1);
dropDownBox.setSelectedIndex(1);
//dropDownBox.setItemSelected(1, true);
}
}
@Override
public void onError(com.google.gwt.http.client.Request request, Throwable exception)
{
Window.alert("Error occured " + exception.getMessage());
}
});
/*if (fltrParmtrArray != null)
{
for (int arrayCnt = 0; arrayCnt < fltrParmtrArray.length; arrayCnt++)
{
//dropDownBox.setText(fltrParmtrArray[arrayCnt]);
}
}*/
addEnterKeyHandler(dropDownBox);
popUpHPnl.add(outerVPanel);
} catch (RequestException e)
{
Window.alert("Error occured " + e.getMessage());
}
}
/*ended new method for drop down box by swati 23 sep 2015*/
private void createDatePikr(final FilterInfo filterInfo, final VerticalPanel popUpHPnl, final String[] fltrParmtrArray)
{
......
......@@ -24,7 +24,6 @@ public class GWTDashBoardReport implements EntryPoint
HorizontalPanel hpanel= new HorizontalPanel();
String metadataname = "";
public String prdFilterName= "";
@SuppressWarnings("unchecked")
public void onModuleLoad()
{
metadataname = Window.Location.getParameter("metadataname") == null ? "" : Window.Location.getParameter("metadataname");
......@@ -53,7 +52,9 @@ public class GWTDashBoardReport implements EntryPoint
Window.alert("Exception :: onModuleLoad() [" + result + "]");
}
}, metadataname);
} else
}
else
{
Window.alert("Please Enter Metadata name");
}
......@@ -100,6 +101,12 @@ public class GWTDashBoardReport implements EntryPoint
parameterList.add(Window.Location.getParameter(filterInfo.getFieldName()) == null ? monthYear : Window.Location.getParameter(filterInfo.getFieldName()));
}
}
/*Add code for current prd code by dhanendra on 06-10-2015 */
else if(filterInfo.getFieldName().equals("CURRENT_PRDCODE"))
{
parameterList.add(Window.Location.getParameter(filterInfo.getFieldName()) == null ? monthYear : Window.Location.getParameter(filterInfo.getFieldName()));
}
/*End code for current prd code by dhanendra on 06-10-2015 */
else
{
......
......@@ -86,10 +86,13 @@ public class GraphComponent extends Composite
/*End code for progess bar to data building- Dhanendra 17Nov2014*/
//MetaDataDtl metaDataDtl =new MetaDataDtl();
//final ArrayList<FilterInfo> filterList = metaDataDtl.getFilters(metaDataJsnObj);
// add variable by swati
String empCodeEpa="";
public GraphComponent(ArrayList<String> parameterList, JSONObject metaDataJsnObj,String showfilter)
{
userMail = Window.Location.getParameter("EMP_MAILCODE") == null ? "" : Window.Location.getParameter("EMP_MAILCODE");
reportCaption= Window.Location.getParameter("GEO_LOCATION") == null ? "" : Window.Location.getParameter("GEO_LOCATION");
empCodeEpa= Window.Location.getParameter("EMP_CODE") == null ? "" : Window.Location.getParameter("EMP_CODE");
String isShowfilter= Window.Location.getParameter("FLAG");
this.jsonObjMetaData = metaDataJsnObj;
this.parameterList = parameterList;
......@@ -351,8 +354,17 @@ public class GraphComponent extends Composite
this.createOuterDiv("Graph"+uniqueId+componentId,type,groupCssTypeNameList.get(0));
idList.add("Graph"+uniqueId+componentId+"Div");
/*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*/
Label componantTtl=null;
if(empCodeEpa.length()>0)
{
componantTtl = new Label(componantTitlNameList.get(0)+" : "+empCodeEpa);
Label componantTtl = new Label(componantTitlNameList.get(0));
}else
{
componantTtl = new Label(componantTitlNameList.get(0));
}
/*added code to append x-axis value in child grpah in title by dhanendra on Date: 07-Dec-2015*/
Image componantTtlImg = new Image("FusionChart/images/"+componentIconName);
Image refreshImg = new Image("FusionChart/images/refresh.png");
......@@ -1332,6 +1344,7 @@ public class GraphComponent extends Composite
@SuppressWarnings("unchecked")
public void getData(final Callback<JSONObject, String> callback, ArrayList<String> parameterList)
{
this.parameterList=parameterList;
String viewOptionSelectd = parameterList.get(parameterList.size()-1);
dataDtl = new MetaDataDtl();
......@@ -1349,7 +1362,6 @@ public class GraphComponent extends Composite
e12LoadImg.setLoadingInfo("Waiting For Data...");
e12LoadImg.setLoading(true);
}
for (Map.Entry<String, ArrayList<String>> entry : datsSourceDtlMap.entrySet())
{
final String key = entry.getKey();
......@@ -1414,7 +1426,6 @@ public class GraphComponent extends Composite
{
if (STATUS_CODE_OK == response.getStatusCode())
{
//Window.alert("response.getText(): "+response.getText());
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());
......@@ -1438,7 +1449,7 @@ public class GraphComponent extends Composite
}
} else
{
Window.alert("Responce for getData null");
//Window.alert("Responce for getData null");
e12LoadImg.setLoading(false);
}
}
......@@ -1459,10 +1470,6 @@ public class GraphComponent extends Composite
public boolean isNumeric(String s) {
return s.matches("[-+]?\\d*\\.?\\d+");
}
/*Start Add this method for multiple Report By Dhanendra 25MAy2015*/
@SuppressWarnings("unchecked")
private JSONObject getDataMapJson(JSONObject dataJsn, String groupName, ArrayList graphDtlList)
......
......@@ -27,6 +27,7 @@ import com.google.gwt.user.client.ui.CheckBox;
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.ListBox;
import com.google.gwt.user.client.ui.MultiWordSuggestOracle;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SuggestBox;
......@@ -158,6 +159,9 @@ public class InputListWidget extends Composite
itemBox.getElement().setAttribute("style", "outline-color: -moz-use-text-color; outline-style: none; outline-width: medium;");
final SuggestBox suggestBox = new SuggestBox(getSuggestions(""), itemBox);
suggestBox.getElement().setId("suggestion_box");
//added to set number of suggestions in suggestion box by sachin 29 sep 2015
suggestBox.setLimit(50);
//ended to set number of suggestions in suggestion box by sachin 29 sep 2015
listItem.add(suggestBox);
Paragraph paragraph = null;
Span span = null;
......@@ -234,7 +238,6 @@ public class InputListWidget extends Composite
});
SuggestBox suggestBox1 =(SuggestBox)listItem.getWidget(listItem.getWidgetCount()-1);
Window.alert("vsuggestBox1 is ="+suggestBox1.getText());
final StringBuffer buffer = new StringBuffer();
suggestBox.getTextBox().addKeyUpHandler(new KeyUpHandler()
{
......@@ -600,6 +603,7 @@ public class InputListWidget extends Composite
FlexTable grid = null;
CheckBox checkBox = null;
TextBox fltrTxtBox = null;
ListBox fltrListBox=null;
BulletList bulletList = null;
ScrollPanel scrollPnl = null;
FilterInfo fltrInfo = null;
......@@ -719,6 +723,19 @@ public class InputListWidget extends Composite
}
}
/**/
else if (horizontalPanel.getWidget(0) instanceof ListBox)
{
fltrListBox = (ListBox) horizontalPanel.getWidget(0);
if (fltrListBox.getTitle().equals(colName))
{
if (!fltrListBox.getItemText(fltrListBox.getSelectedIndex()).isEmpty())
{
fltrDataMap.put(fltrInfo.getFieldName(), ""+fltrListBox.getSelectedIndex());
}
}
}
/**/
}
}
}
......
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