Commit 05da7cca authored by sbade's avatar sbade

in drop down filter index was passed to filter selected data instead of it value is passed.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100308 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 46884c4b
...@@ -443,7 +443,8 @@ public class FilterCreator extends Composite ...@@ -443,7 +443,8 @@ public class FilterCreator extends Composite
private Widget popHlpGridChkBox(HashMap<String, ArrayList<String>> hashMap, FilterInfo filterInfo, String[] paramtrArray) private Widget popHlpGridChkBox(HashMap<String, ArrayList<String>> hashMap, FilterInfo filterInfo, String[] paramtrArray)
{ {
final ScrollPanel checkboxScrlPnl = new ScrollPanel(); final ScrollPanel checkboxScrlPnl = new ScrollPanel();
checkboxScrlPnl.setTitle(filterInfo.getFieldName()); checkboxScrlPnl.setTitle(filterInfo.getColDescr());
checkboxScrlPnl.getElement().setId(filterInfo.getFieldName());
checkboxScrlPnl.setStyleName("filterScrlPnl"); checkboxScrlPnl.setStyleName("filterScrlPnl");
CheckBox chkBox = null; CheckBox chkBox = null;
String row = ""; String row = "";
...@@ -560,7 +561,8 @@ public class FilterCreator extends Composite ...@@ -560,7 +561,8 @@ public class FilterCreator extends Composite
RadioButton radioBtn = null; RadioButton radioBtn = null;
ArrayList<String> values = null; ArrayList<String> values = null;
final ScrollPanel checkboxScrlPnl = new ScrollPanel(); final ScrollPanel checkboxScrlPnl = new ScrollPanel();
checkboxScrlPnl.setTitle(filterInfo.getFieldName()); checkboxScrlPnl.setTitle(filterInfo.getColDescr());
checkboxScrlPnl.getElement().setId(filterInfo.getFieldName());
checkboxScrlPnl.setStyleName("filterScrlPnl"); checkboxScrlPnl.setStyleName("filterScrlPnl");
final FlexTable flexTable = new FlexTable(); final FlexTable flexTable = new FlexTable();
flexTable.setStyleName("flexTable"); flexTable.setStyleName("flexTable");
...@@ -879,7 +881,7 @@ public class FilterCreator extends Composite ...@@ -879,7 +881,7 @@ public class FilterCreator extends Composite
} }
} }
} }
if (scrollPnl.getTitle().equals(colName)) if (scrollPnl.getElement().getId().equals(colName))
{ {
if (selectedChkBoxBuffer.toString().trim().length() != 0) if (selectedChkBoxBuffer.toString().trim().length() != 0)
//if (selectedChkBoxBuffer.toString()!= null) //if (selectedChkBoxBuffer.toString()!= null)
...@@ -907,7 +909,8 @@ public class FilterCreator extends Composite ...@@ -907,7 +909,8 @@ public class FilterCreator extends Composite
} else if (horizontalPanel.getWidget(0) instanceof TextBox) } else if (horizontalPanel.getWidget(0) instanceof TextBox)
{ {
fltrTxtBox = (TextBox) horizontalPanel.getWidget(0); fltrTxtBox = (TextBox) horizontalPanel.getWidget(0);
if (fltrTxtBox.getTitle().equals(colName)) //if (fltrTxtBox.getTitle().equals(colName))
if (fltrTxtBox.getElement().getId().equals(colName))
{ {
if (!fltrTxtBox.getText().isEmpty()) if (!fltrTxtBox.getText().isEmpty())
//if (fltrTxtBox.getText()!=null) //if (fltrTxtBox.getText()!=null)
...@@ -936,7 +939,7 @@ public class FilterCreator extends Composite ...@@ -936,7 +939,7 @@ public class FilterCreator extends Composite
fltrDateBox = (DateBox) horizontalPanel.getWidget(0); fltrDateBox = (DateBox) horizontalPanel.getWidget(0);
if (fltrDateBox.getTitle().equals(colName)) if (fltrDateBox.getElement().getId().equals(colName))
{ {
if (!fltrDateBox.toString().isEmpty()) if (!fltrDateBox.toString().isEmpty())
{ {
...@@ -955,7 +958,7 @@ public class FilterCreator extends Composite ...@@ -955,7 +958,7 @@ public class FilterCreator extends Composite
bulletList = (BulletList) horizontalPanel.getWidget(0); bulletList = (BulletList) horizontalPanel.getWidget(0);
selectedChkBoxBuffer = new StringBuffer(); selectedChkBoxBuffer = new StringBuffer();
selectedChkBoxBufferDtl = new StringBuffer(); selectedChkBoxBufferDtl = new StringBuffer();
if (bulletList.getTitle().equals(colName)) if (bulletList.getElement().getId().equals(colName))
{ {
for (int j = 0; j < bulletList.getWidgetCount(); j++) for (int j = 0; j < bulletList.getWidgetCount(); j++)
{ {
...@@ -1002,12 +1005,16 @@ public class FilterCreator extends Composite ...@@ -1002,12 +1005,16 @@ public class FilterCreator extends Composite
else if (horizontalPanel.getWidget(0) instanceof ListBox) else if (horizontalPanel.getWidget(0) instanceof ListBox)
{ {
fltrListBox = (ListBox) horizontalPanel.getWidget(0); fltrListBox = (ListBox) horizontalPanel.getWidget(0);
if (fltrListBox.getTitle().equals(colName)) if (fltrListBox.getElement().getId().equals(colName))
{ {
if (!fltrListBox.getTitle().isEmpty()) if (!fltrListBox.getElement().getId().isEmpty())
{ {
popUpSendDtatList.add(""+fltrListBox.getSelectedIndex()); //popUpSendDtatList.add(""+fltrListBox.getSelectedIndex());
popUpSendDtatListDtl.add(fltrListBox.getItemText(fltrListBox.getSelectedIndex())); //popUpSendDtatListDtl.add(fltrListBox.getItemText(fltrListBox.getSelectedIndex()));
popUpSendDtatList.add(""+fltrListBox.getValue(fltrListBox.getSelectedIndex()));
popUpSendDtatListDtl.add(fltrListBox.getValue(fltrListBox.getSelectedIndex()));
} else } else
{ {
if ("Y".equalsIgnoreCase(mandatotyFilter)) if ("Y".equalsIgnoreCase(mandatotyFilter))
...@@ -1185,7 +1192,8 @@ public class FilterCreator extends Composite ...@@ -1185,7 +1192,8 @@ public class FilterCreator extends Composite
{ {
TextBox inputTxtBox = new TextBox(); TextBox inputTxtBox = new TextBox();
Label columnNameLbl = null; Label columnNameLbl = null;
inputTxtBox.setTitle(filterInfo.getFieldName()); inputTxtBox.setTitle(filterInfo.getColDescr());
inputTxtBox.getElement().setId(filterInfo.getFieldName());
inputTxtBox.setStylePrimaryName("textBoxCss"); inputTxtBox.setStylePrimaryName("textBoxCss");
VerticalPanel outerVPanel = new VerticalPanel(); VerticalPanel outerVPanel = new VerticalPanel();
HorizontalPanel hPanel = new HorizontalPanel(); HorizontalPanel hPanel = new HorizontalPanel();
...@@ -1216,7 +1224,8 @@ public class FilterCreator extends Composite ...@@ -1216,7 +1224,8 @@ public class FilterCreator extends Composite
{ {
final ListBox dropDownBox = new ListBox(); final ListBox dropDownBox = new ListBox();
Label columnNameLbl = null; Label columnNameLbl = null;
dropDownBox.setTitle(filterInfo.getFieldName()); dropDownBox.setTitle(filterInfo.getColDescr());
dropDownBox.getElement().setId(filterInfo.getFieldName());
dropDownBox.setStylePrimaryName("drpDownBoxCss"); dropDownBox.setStylePrimaryName("drpDownBoxCss");
VerticalPanel outerVPanel = new VerticalPanel(); VerticalPanel outerVPanel = new VerticalPanel();
HorizontalPanel hPanel = new HorizontalPanel(); HorizontalPanel hPanel = new HorizontalPanel();
...@@ -1230,6 +1239,8 @@ public class FilterCreator extends Composite ...@@ -1230,6 +1239,8 @@ public class FilterCreator extends Composite
outerVPanel.add(hPanel); outerVPanel.add(hPanel);
String objActionPath = "/ibase/DashboardFilterServlet?FIELDNAME=" + filterInfo.getFieldName() + "&OBJ_NAME=" + filterInfo.getModName(); String objActionPath = "/ibase/DashboardFilterServlet?FIELDNAME=" + filterInfo.getFieldName() + "&OBJ_NAME=" + filterInfo.getModName();
RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath); RequestBuilder reqBuilder = new RequestBuilder(RequestBuilder.POST, objActionPath);
int cnt=0;
reqBuilder.sendRequest(null, new RequestCallback() reqBuilder.sendRequest(null, new RequestCallback()
{ {
@Override @Override
...@@ -1239,6 +1250,7 @@ public class FilterCreator extends Composite ...@@ -1239,6 +1250,7 @@ public class FilterCreator extends Composite
String row=""; String row="";
ArrayList valueList = new ArrayList<String>(); ArrayList valueList = new ArrayList<String>();
drpDwnMap=getPopUpDataMap(response.getText()); drpDwnMap=getPopUpDataMap(response.getText());
int cnt=0;
for (Map.Entry<String, ArrayList<String>> entry : drpDwnMap.entrySet()) for (Map.Entry<String, ArrayList<String>> entry : drpDwnMap.entrySet())
{ {
row = entry.getKey(); row = entry.getKey();
...@@ -1246,10 +1258,13 @@ public class FilterCreator extends Composite ...@@ -1246,10 +1258,13 @@ public class FilterCreator extends Composite
dropDownBox.addItem(""+valueList.get(1)); dropDownBox.addItem(""+valueList.get(1));
dropDownBox.setVisibleItemCount(1); dropDownBox.setVisibleItemCount(1);
dropDownBox.setSelectedIndex(1); dropDownBox.setSelectedIndex(1);
dropDownBox.setValue(cnt,""+valueList.get(0));
//dropDownBox.setItemSelected(1, true); //dropDownBox.setItemSelected(1, true);
cnt++;
} }
} }
@Override @Override
public void onError(com.google.gwt.http.client.Request request, Throwable exception) public void onError(com.google.gwt.http.client.Request request, Throwable exception)
{ {
...@@ -1280,7 +1295,8 @@ public class FilterCreator extends Composite ...@@ -1280,7 +1295,8 @@ public class FilterCreator extends Composite
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yy"); SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yy");
DateBox dateBox = new DateBox(); DateBox dateBox = new DateBox();
dateBox.setFormat(new DateBox.DefaultFormat(dateFormat)); dateBox.setFormat(new DateBox.DefaultFormat(dateFormat));
dateBox.setTitle(filterInfo.getFieldName()); dateBox.setTitle(filterInfo.getColDescr());
dateBox.getElement().setId(filterInfo.getFieldName());
dateBox.setStylePrimaryName("textBoxCss"); dateBox.setStylePrimaryName("textBoxCss");
VerticalPanel outerVPanel = new VerticalPanel(); VerticalPanel outerVPanel = new VerticalPanel();
HorizontalPanel hPanel = new HorizontalPanel(); HorizontalPanel hPanel = new HorizontalPanel();
......
...@@ -61,7 +61,8 @@ public class InputListWidget extends Composite ...@@ -61,7 +61,8 @@ public class InputListWidget extends Composite
public InputListWidget(String suggetions, HorizontalPanel popUpHPnl, FilterInfo filterInfo, String[] splitedArray) public InputListWidget(String suggetions, HorizontalPanel popUpHPnl, FilterInfo filterInfo, String[] splitedArray)
{ {
final BulletList list = new BulletList(); final BulletList list = new BulletList();
list.setTitle(filterInfo.getFieldName()); list.setTitle(filterInfo.getColDescr());
list.getElement().setId(filterInfo.getFieldName());
list.setStyleName("token-input-list"); list.setStyleName("token-input-list");
final ListItem item = new ListItem(); final ListItem item = new ListItem();
item.setStyleName("token-input-input-token"); item.setStyleName("token-input-input-token");
...@@ -151,7 +152,8 @@ public class InputListWidget extends Composite ...@@ -151,7 +152,8 @@ public class InputListWidget extends Composite
public InputListWidget(HorizontalPanel popUpHPnl, final FilterInfo filterInfo, String[] splitedArray, final VerticalPanel popUpVPnl, final ArrayList<FilterInfo> filterList) public InputListWidget(HorizontalPanel popUpHPnl, final FilterInfo filterInfo, String[] splitedArray, final VerticalPanel popUpVPnl, final ArrayList<FilterInfo> filterList)
{ {
final BulletList bulletList = new BulletList(); final BulletList bulletList = new BulletList();
bulletList.setTitle(filterInfo.getFieldName()); bulletList.setTitle(filterInfo.getColDescr());
bulletList.getElement().setId(filterInfo.getFieldName());
bulletList.setStyleName("token-input-list"); bulletList.setStyleName("token-input-list");
final ListItem listItem = new ListItem(); final ListItem listItem = new ListItem();
listItem.setStyleName("token-input-input-token"); listItem.setStyleName("token-input-input-token");
...@@ -272,6 +274,7 @@ public class InputListWidget extends Composite ...@@ -272,6 +274,7 @@ public class InputListWidget extends Composite
final BulletList list = new BulletList(); final BulletList list = new BulletList();
list.setTitle(smrtFilterInfo.getFltrColName()); list.setTitle(smrtFilterInfo.getFltrColName());
list.getElement().setId(smrtFilterInfo.getFltrColName());
list.setStyleName("token-input-list"); list.setStyleName("token-input-list");
ListItem item = new ListItem(); ListItem item = new ListItem();
item.setStyleName("token-input-input-token"); item.setStyleName("token-input-input-token");
...@@ -651,7 +654,7 @@ public class InputListWidget extends Composite ...@@ -651,7 +654,7 @@ public class InputListWidget extends Composite
} }
} }
} }
if (scrollPnl.getTitle().equals(colName)) if (scrollPnl.getElement().getId().equals(colName))
{ {
if (selectedChkBoxBuffer.toString().trim().length() != 0) if (selectedChkBoxBuffer.toString().trim().length() != 0)
{ {
...@@ -661,7 +664,7 @@ public class InputListWidget extends Composite ...@@ -661,7 +664,7 @@ public class InputListWidget extends Composite
} else if (horizontalPanel.getWidget(0) instanceof TextBox) } else if (horizontalPanel.getWidget(0) instanceof TextBox)
{ {
fltrTxtBox = (TextBox) horizontalPanel.getWidget(0); fltrTxtBox = (TextBox) horizontalPanel.getWidget(0);
if (fltrTxtBox.getTitle().equals(colName)) if (fltrTxtBox.getElement().getId().equals(colName))
{ {
if (!fltrTxtBox.getText().isEmpty()) if (!fltrTxtBox.getText().isEmpty())
{ {
...@@ -673,7 +676,7 @@ public class InputListWidget extends Composite ...@@ -673,7 +676,7 @@ public class InputListWidget extends Composite
fltrDateBox = (DateBox) horizontalPanel.getWidget(0); fltrDateBox = (DateBox) horizontalPanel.getWidget(0);
if (fltrDateBox.getTitle().equals(colName)) if (fltrDateBox.getElement().getId().equals(colName))
{ {
{ {
fltrDataMap.put(fltrInfo.getFieldName(), DateTimeFormat.getFormat("dd/MM/yyyy").format(fltrDateBox.getValue())); fltrDataMap.put(fltrInfo.getFieldName(), DateTimeFormat.getFormat("dd/MM/yyyy").format(fltrDateBox.getValue()));
...@@ -684,7 +687,7 @@ public class InputListWidget extends Composite ...@@ -684,7 +687,7 @@ public class InputListWidget extends Composite
{ {
bulletList = (BulletList) horizontalPanel.getWidget(0); bulletList = (BulletList) horizontalPanel.getWidget(0);
selectedChkBoxBuffer = new StringBuffer(); selectedChkBoxBuffer = new StringBuffer();
if (bulletList.getTitle().equals(colName)) if (bulletList.getElement().getId().equals(colName))
{ {
/* Added new code by sachin for sending only newly enterd value for filter on 23 Sep 15*/ /* Added new code by sachin for sending only newly enterd value for filter on 23 Sep 15*/
listItem = (ListItem) bulletList.getWidget(bulletList.getWidgetCount() - 1); listItem = (ListItem) bulletList.getWidget(bulletList.getWidgetCount() - 1);
...@@ -727,11 +730,12 @@ public class InputListWidget extends Composite ...@@ -727,11 +730,12 @@ public class InputListWidget extends Composite
else if (horizontalPanel.getWidget(0) instanceof ListBox) else if (horizontalPanel.getWidget(0) instanceof ListBox)
{ {
fltrListBox = (ListBox) horizontalPanel.getWidget(0); fltrListBox = (ListBox) horizontalPanel.getWidget(0);
if (fltrListBox.getTitle().equals(colName)) if (fltrListBox.getElement().getId().equals(colName))
{ {
if (!fltrListBox.getItemText(fltrListBox.getSelectedIndex()).isEmpty()) if (!fltrListBox.getItemText(fltrListBox.getSelectedIndex()).isEmpty())
{ {
fltrDataMap.put(fltrInfo.getFieldName(), ""+fltrListBox.getSelectedIndex()); fltrDataMap.put(fltrInfo.getFieldName(), ""+fltrListBox.getValue(fltrListBox.getSelectedIndex()));
//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