Thank you very much!
Regards
Regards
criteria:[ { fieldName:"name", operator:"iContains", value:"A" } ]
textMatchStyle:"startsWith",
com.smartgwt.client.widgets.form.fields.FormItem.setOperator(OperatorId) // Passing DSRequest properties into the following... DSRequest optionFilterContext = new DSRequest(); optionFilterContext.setTextMatchStyle(TextMatchStyle.STARTS_WITH); com.smartgwt.client.widgets.form.fields.ComboBoxItem.setOptionFilterContext(DSRequest) com.smartgwt.client.widgets.form.fields.ComboBoxItem.setPickListCriteria(DSRequest)
final String foreignDisplayField = "name"; item.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction() { @Override public Criteria getCriteria(FormItemFunctionContext itemContext) { FormItem i = itemContext.getFormItem(); if (!(i instanceof ComboBoxItem)) return null; ComboBoxItem item = (ComboBoxItem) i; AdvancedCriteria c1 = new AdvancedCriteria(<some static criteria>); boolean filterWithValue = item.getFilterWithValue(); if (filterWithValue) { AdvancedCriteria c2 = new AdvancedCriteria(foreignDisplayField, OperatorId.ISTARTS_WITH, item.getValueAsString()); return DataSource.combineCriteria(c1, c2, CriteriaCombineOperator.AND); } return c1; } });
Comment