Im Have a Picklist with a filter editor. When I type in the filter editor, the filtering happens locally.
Requirement: need the number of records which shows in the pick list to determine if its empty or not.
I tried to achieve this using a FilterEditorSubmitHandler
ComboboxItem equipmentProfile = new ComboBoxItem("profileCode", "Equipment Profile);
...
...
/* assume i have created a new "pickListProperties", it contains all fields*/
equipmentProfile.setPickListProperties(pickListProperties);
pickListProperties.addFilterEditorSubmitHandler(new FilterEditorSubmitHandler() {
@Override
public void onFilterEditorSubmit(FilterEditorSubmitEvent filterEditorSubmitEvent) {
if (equipmentProfile.filterClientPickListData().length == 0) {
SC.say("1: " + String.valueOf(equipmentProfile.filterClientPickListData().length));
} else {
SC.say("2: " + String.valueOf(equipmentProfile.filterClientPickListData().length));
}
}
}
I noticed equipmentProfile.filterClientPickListData().length gives random counts when typing in the pick list filter editor.
Please be kind to give a solution to achieve this.
Comment