Hi Isomorphic,
Using com.smartgwt.client.data.DataSource.setTypeOperators(FieldType, OperatorId[]) to set the field type operators on a datasource is not functioning how it used to after upgrading from "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)" to "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)".
For an example, please see below, where the "equals", "not equals", "is null", "is not null" operators no longer appear as operator options in "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)", whereas, they did in "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)".
Regards
Using com.smartgwt.client.data.DataSource.setTypeOperators(FieldType, OperatorId[]) to set the field type operators on a datasource is not functioning how it used to after upgrading from "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)" to "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)".
For an example, please see below, where the "equals", "not equals", "is null", "is not null" operators no longer appear as operator options in "v12.0p_2018-09-21/Pro Deployment (built 2018-09-21)", whereas, they did in "v10.1p_2017-08-10/Pro Deployment (built 2017-08-10)".
Regards
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DataSource xmlns:fmt="WEB-INF/" ID="sandbox3" serverType="generic">
<title>Sandbox3</title>
<fields>
<field name="t1" type="text">
<title>Text Field</title>
</field>
</fields>
</DataSource>
Code:
package com.sandbox.client;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.types.FieldType;
import com.smartgwt.client.types.OperatorId;
import com.smartgwt.client.widgets.form.FilterBuilder;
import com.smartgwt.client.widgets.layout.VLayout;
public class Sandbox3 implements EntryPoint {
public static final OperatorId[] TEXT_OPERATORS = new OperatorId[] { OperatorId.ICONTAINS, OperatorId.ISTARTS_WITH, OperatorId.IENDS_WITH,
OperatorId.IEQUALS, OperatorId.INOT_CONTAINS, OperatorId.INOT_STARTS_WITH, OperatorId.INOT_ENDS_WITH, OperatorId.INOT_EQUAL,
OperatorId.IS_NULL, OperatorId.NOT_NULL, OperatorId.IN_SET, OperatorId.NOT_IN_SET, OperatorId.LESS_THAN, OperatorId.LESS_OR_EQUAL,
OperatorId.GREATER_THAN, OperatorId.GREATER_OR_EQUAL, OperatorId.AND, OperatorId.OR, OperatorId.NOT };
@Override
public void onModuleLoad() {
VLayout appLayout = new VLayout();
appLayout.setWidth100();
appLayout.setHeight100();
FilterBuilder filterBuilder = new FilterBuilder();
filterBuilder.setWidth100();
filterBuilder.setHeight100();
DataSource ds = DataSource.getDataSource("sandbox3");
ds.setTypeOperators(FieldType.TEXT, TEXT_OPERATORS);
filterBuilder.setDataSource(ds);
appLayout.setMargin(5);
appLayout.setMembersMargin(5);
appLayout.addMember(filterBuilder);
appLayout.draw();
}
}
Comment