I am using:
SmartClient Version: v10.0p_2015-06-25/Pro Deployment (built 2015-06-25)
On Firefox ESR 38.2.1
I have created a FilterBuilder with a DataSource attached. When for a field in the Data Source I set Editor Properties to a ComboBoxItem when the criteria is returned from the FilterBuilder for iequals, inotequals, icontains, etc it always returns a istartwith operator instead of the appropriate operator.
Example:
<CODE>
XJSONDataSource ds = new XJSONDataSource();
DataSourceTextField fld = new DataSourceTextField("test","Test");
FieldDS options = FieldDS.getInstance();
ComboBoxItem auto = new ComboBoxItem();
auto.setOptionDataSource(options);
auto.setDisplayField("name");
auto.setValueField("id");
auto.setShowPickerIcon(false);
auto.setFetchDelay(500);
auto.setLoadingDisplayValue(null);
auto.setShowOptionsFromDataSource(true);
Criteria criteria = new Criteria("field", fields[f]);
criteria.addCriteria(new Criteria("objectType", objectType));
criteria.addCriteria(new Criteria("date", new Date().getTime()+""));
auto.setPickListCriteria(criteria);
fld.setEditorProperties(auto);
ds.setFields(fld);
ds.setDataURL("..search");
ds.setDataProtocol(DSProtocol.GETPARAMS);
ds.setDataFormat(DSDataFormat.JSON);
ds.setRecordXPath("data");
FilterBuilder filterBuilder = new FilterBuilder();
filterBuilder.setSaveOnEnter(true);
filterBuilder.setShowSubClauseButton(false);
filterBuilder.setTopOperatorAppearance(TopOperatorAppearance.NONE);
filterBuilder.setSortFields(false);
filterBuilder.setDataSource(ds);
</CODE>
If I do not set the Editor Properties then the correct operator is returned.
SmartClient Version: v10.0p_2015-06-25/Pro Deployment (built 2015-06-25)
On Firefox ESR 38.2.1
I have created a FilterBuilder with a DataSource attached. When for a field in the Data Source I set Editor Properties to a ComboBoxItem when the criteria is returned from the FilterBuilder for iequals, inotequals, icontains, etc it always returns a istartwith operator instead of the appropriate operator.
Example:
<CODE>
XJSONDataSource ds = new XJSONDataSource();
DataSourceTextField fld = new DataSourceTextField("test","Test");
FieldDS options = FieldDS.getInstance();
ComboBoxItem auto = new ComboBoxItem();
auto.setOptionDataSource(options);
auto.setDisplayField("name");
auto.setValueField("id");
auto.setShowPickerIcon(false);
auto.setFetchDelay(500);
auto.setLoadingDisplayValue(null);
auto.setShowOptionsFromDataSource(true);
Criteria criteria = new Criteria("field", fields[f]);
criteria.addCriteria(new Criteria("objectType", objectType));
criteria.addCriteria(new Criteria("date", new Date().getTime()+""));
auto.setPickListCriteria(criteria);
fld.setEditorProperties(auto);
ds.setFields(fld);
ds.setDataURL("..search");
ds.setDataProtocol(DSProtocol.GETPARAMS);
ds.setDataFormat(DSDataFormat.JSON);
ds.setRecordXPath("data");
FilterBuilder filterBuilder = new FilterBuilder();
filterBuilder.setSaveOnEnter(true);
filterBuilder.setShowSubClauseButton(false);
filterBuilder.setTopOperatorAppearance(TopOperatorAppearance.NONE);
filterBuilder.setSortFields(false);
filterBuilder.setDataSource(ds);
</CODE>
If I do not set the Editor Properties then the correct operator is returned.
Comment