Commit fdab25be authored by sbade's avatar sbade

modified getFltrSelectedData method


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98591 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7efa6a5c
...@@ -233,6 +233,8 @@ public class InputListWidget extends Composite ...@@ -233,6 +233,8 @@ public class InputListWidget extends Composite
} }
}); });
SuggestBox suggestBox1 =(SuggestBox)listItem.getWidget(listItem.getWidgetCount()-1);
Window.alert("vsuggestBox1 is ="+suggestBox1.getText());
final StringBuffer buffer = new StringBuffer(); final StringBuffer buffer = new StringBuffer();
suggestBox.getTextBox().addKeyUpHandler(new KeyUpHandler() suggestBox.getTextBox().addKeyUpHandler(new KeyUpHandler()
{ {
...@@ -264,6 +266,7 @@ public class InputListWidget extends Composite ...@@ -264,6 +266,7 @@ public class InputListWidget extends Composite
public InputListWidget(ArrayList<String> suggetions, HorizontalPanel popUpHPnl, SmrtFilterInfo smrtFilterInfo) public InputListWidget(ArrayList<String> suggetions, HorizontalPanel popUpHPnl, SmrtFilterInfo smrtFilterInfo)
{ {
final BulletList list = new BulletList(); final BulletList list = new BulletList();
list.setTitle(smrtFilterInfo.getFltrColName()); list.setTitle(smrtFilterInfo.getFltrColName());
list.setStyleName("token-input-list"); list.setStyleName("token-input-list");
...@@ -606,6 +609,10 @@ public class InputListWidget extends Composite ...@@ -606,6 +609,10 @@ public class InputListWidget extends Composite
HorizontalPanel horizontalPanel = null; HorizontalPanel horizontalPanel = null;
VerticalPanel verticalPanel = null; VerticalPanel verticalPanel = null;
StringBuffer selectedChkBoxBuffer = null; StringBuffer selectedChkBoxBuffer = null;
/* Added new code by sachin on 23 Sep 15*/
SuggestBox suggestBox = null;
String inputTxt ="";
/* End Added new code by sachin on 23 Sep 15*/
HashMap<String, String> fltrDataMap = new HashMap<String, String>(); HashMap<String, String> fltrDataMap = new HashMap<String, String>();
for (int i = 0; i < filterList.size(); i++) for (int i = 0; i < filterList.size(); i++)
...@@ -675,32 +682,36 @@ public class InputListWidget extends Composite ...@@ -675,32 +682,36 @@ public class InputListWidget extends Composite
selectedChkBoxBuffer = new StringBuffer(); selectedChkBoxBuffer = new StringBuffer();
if (bulletList.getTitle().equals(colName)) if (bulletList.getTitle().equals(colName))
{ {
for (int j = 0; j < bulletList.getWidgetCount(); j++) /* Added new code by sachin for sending only newly enterd value for filter on 23 Sep 15*/
{ listItem = (ListItem) bulletList.getWidget(bulletList.getWidgetCount() - 1);
if (bulletList.getWidget(j) instanceof ListItem) suggestBox = (SuggestBox) listItem.getWidget(listItem.getWidgetCount() - 1);
{ inputTxt = suggestBox.getText();
listItem = (ListItem) bulletList.getWidget(j); /*
if (listItem.getWidget(0) instanceof Paragraph) * for (int j = 0; j <
{ * bulletList.getWidgetCount(); j++) { if
paragraph = (Paragraph) listItem.getWidget(0); * (bulletList.getWidget(j) instanceof ListItem)
* { listItem = (ListItem)
if (selectedChkBoxBuffer.length() != 0) * bulletList.getWidget(j); if
{ * (listItem.getWidget(0) instanceof Paragraph)
selectedChkBoxBuffer.append("," + paragraph.getText().trim()); * { paragraph = (Paragraph)
} else * listItem.getWidget(0);
{ *
selectedChkBoxBuffer.append(paragraph.getText().trim()); * if (selectedChkBoxBuffer.length() != 0) {
} * selectedChkBoxBuffer.append("," +
* paragraph.getText().trim()); } else {
} else * selectedChkBoxBuffer
{ * .append(paragraph.getText().trim()); }
SuggestBox box = (SuggestBox) listItem.getWidget(0); *
* } else { SuggestBox box = (SuggestBox)
selectedChkBoxBuffer.append(box.getText()); * listItem.getWidget(0);
} *
} * selectedChkBoxBuffer.append(box.getText()); }
} * } }
*/
selectedChkBoxBuffer.append(inputTxt);
/* End Added new code by sachin on 23 Sep 15*/
if (selectedChkBoxBuffer.toString().trim().length() != 0) if (selectedChkBoxBuffer.toString().trim().length() != 0)
{ {
fltrDataMap.put(fltrInfo.getFieldName(), selectedChkBoxBuffer.toString()); fltrDataMap.put(fltrInfo.getFieldName(), selectedChkBoxBuffer.toString());
......
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