Im using the following Version of SmartGWT:
v8.3_2012-11-20/PowerEdition Deployment 2012-11-20
on Firefox 18.0.1
I'm using an optionDataSource on a select item with the following values:
The SelectItem is initialized this way:
Now depending on a list selection I want to filter the shown values, but there occurs a problem. First the code where I build my pickListCriteria:
Now I get a strange behaviour:
{1} as input results in {A,AB} as selectable Options
{1,2,4} results in the full list
{1,4} results in an empty selector
What am I doing wrong? Is this the right way to filter the Options?
v8.3_2012-11-20/PowerEdition Deployment 2012-11-20
on Firefox 18.0.1
I'm using an optionDataSource on a select item with the following values:
Code:
ID:NAME 1:A 2:B 3:C 4:BX 6:CX 7:AX 14:AB
Code:
SelectItem selector=new SelectItem(); selector.setOptionDataSource(DataSources.ds);//Data Source for the table up there selector.setValueField("ID"); selector.setDisplayField("NAME");
Code:
public void selectionChanged() { Criteria crit = null; for (Integer id : getFilterIds()) { if (crit == null) { crit = new Criteria("ID", "" + id); } else { crit = DataSource.combineCriteria(crit, new Criteria("ID", "" + id), CriteriaCombineOperator.OR); } } if (crit != null) { selector.setPickListCriteria(crit); } }
{1} as input results in {A,AB} as selectable Options
{1,2,4} results in the full list
{1,4} results in an empty selector
What am I doing wrong? Is this the right way to filter the Options?
Comment