I believe this has been fixed in the latest 6.1p build but would it be possible to have it fixed in 6.0p? The issue is that if an advanced filter has fields that have different operators, switching between fields leaves the previous operator selected even if that operator is not available for the new field. In my standalone test case this can be seen by switching to the Country field, selected "contains" and switching back to the Code field which does not have the contains operator (see images attached as well).
On the console I see this warning which I also see in 6.1p, not sure if it is relevant: WARN:Log:Criterion specified unknown operator [null criterion]. Using the first valid operator (equals) instead
This is my test case running under Firefox 57.0.4 (64-bit), MacOSX 10.13.2, GWT 2.7.0, SmartGWT 6.0p (v11.0p_2018-01-11).
Thanks.
On the console I see this warning which I also see in 6.1p, not sure if it is relevant: WARN:Log:Criterion specified unknown operator [null criterion]. Using the first valid operator (equals) instead
This is my test case running under Firefox 57.0.4 (64-bit), MacOSX 10.13.2, GWT 2.7.0, SmartGWT 6.0p (v11.0p_2018-01-11).
Code:
DataSource worldDS = new DataSource(); worldDS.setID("worldDS"); worldDS.setRecordXPath("/List/country"); DataSourceIntegerField pkField = new DataSourceIntegerField("pk"); pkField.setHidden(true); pkField.setPrimaryKey(true); DataSourceTextField countryCodeField = new DataSourceTextField("countryCode", "Code"); countryCodeField.setRequired(true); countryCodeField.setValidOperators(OperatorId.EQUALS, OperatorId.NOT_EQUAL); DataSourceTextField countryNameField = new DataSourceTextField("countryName", "Country"); countryNameField.setRequired(true); countryNameField.setValidOperators(OperatorId.EQUALS, OperatorId.NOT_EQUAL, OperatorId.CONTAINS); worldDS.setFields(pkField, countryCodeField, countryNameField); worldDS.setClientOnly(true); final FilterBuilder filterBuilder = new FilterBuilder(); filterBuilder.setDataSource(worldDS); VStack vStack = new VStack(10); vStack.addMember(filterBuilder); vStack.draw();
Comment