Hi ,
I have a requirement in which based on some parameters value change , the dropdown data should change, for that we used "setPickListFilterCriteriaFunction" for the sleect Item like this
ComboBoxItem filterSelectItem = new ComboBoxItem();
DataSource hdwAttrTypeDS = DataSource.get(ClientConstants.HARDWARE_ATTR_TYPE_DS);
filterSelectItem.setSortField(DESCRIPTION);
filterSelectItem.setDisplayField(DESCRIPTION);
filterSelectItem.setValueField(DESCRIPTION);
filterSelectItem.setOptionDataSource(hdwAttrTypeDS);
filterSelectItem.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() {
@Override
public Criteria getCriteria(FormItemFunctionContext itemContext) {
Criteria criteria1 = new Criteria();
criteria1.addCriteria(PRICE_BOOK_ID, HardwarePriceBookViewPage.currentSelectedPriceBook);
return criteria1;
}
});
filterSelectItem.setAutoFetchData(false);
attrTypeField.setFilterEditorProperties(filterSelectItem);
attrTypeField.setFilterOperator(OperatorId.EQUALS);
Now when i do like this , my purpose of dynamically populating the dropdown is served but the feature of auto populating the options when some character is typed is not working
Like if i have values A,AB,ABC,ABCD in my dropdown so when i press A in the filter dropdown , it is not showing me the values starting or containing A
When i remove the "setPickListFilterCriteriaFunction" and pass the crtieria normally , then it works
I have a requirement in which based on some parameters value change , the dropdown data should change, for that we used "setPickListFilterCriteriaFunction" for the sleect Item like this
ComboBoxItem filterSelectItem = new ComboBoxItem();
DataSource hdwAttrTypeDS = DataSource.get(ClientConstants.HARDWARE_ATTR_TYPE_DS);
filterSelectItem.setSortField(DESCRIPTION);
filterSelectItem.setDisplayField(DESCRIPTION);
filterSelectItem.setValueField(DESCRIPTION);
filterSelectItem.setOptionDataSource(hdwAttrTypeDS);
filterSelectItem.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() {
@Override
public Criteria getCriteria(FormItemFunctionContext itemContext) {
Criteria criteria1 = new Criteria();
criteria1.addCriteria(PRICE_BOOK_ID, HardwarePriceBookViewPage.currentSelectedPriceBook);
return criteria1;
}
});
filterSelectItem.setAutoFetchData(false);
attrTypeField.setFilterEditorProperties(filterSelectItem);
attrTypeField.setFilterOperator(OperatorId.EQUALS);
Now when i do like this , my purpose of dynamically populating the dropdown is served but the feature of auto populating the options when some character is typed is not working
Like if i have values A,AB,ABC,ABCD in my dropdown so when i press A in the filter dropdown , it is not showing me the values starting or containing A
When i remove the "setPickListFilterCriteriaFunction" and pass the crtieria normally , then it works
Comment