Using SmartGWT 3.0 Power GA (details at end of post), we tried to set the operator type for the datasrouce that a filterbuilder is set to. The filterbuilder appears to ignore (ie not use) the operator types of
OperatorId.BETWEEN, OperatorId.CONTAINS,OperatorId.CONTAINS_FIELD,OperatorId.STARTS_WITH,OperatorId.STARTS_WITH_FIELD and a bunch of others.
(We cannot use the compartively named case-insensitive operators, such as OperatorId.ICONTAINS, since the underlying database that we're using is in fact case sensitive. And we noticed that the ICONTAINS operator type causes the underlying SQL that is generated to unecessarily (and incorrectly) lowercase the text that a user enters ino the filter builder.)
Here's the code that we used...it's pretty straightforward we think:
Any confirmation that this is a known issue? Or am I doing something wrong?
Here's the version info requested:
SmartClient Version: SC_SNAPSHOT-2011-12-05/PowerEdition Deployment (built 2011-12-05)
Browser: Mozilla Firefox 4.0.1
OperatorId.BETWEEN, OperatorId.CONTAINS,OperatorId.CONTAINS_FIELD,OperatorId.STARTS_WITH,OperatorId.STARTS_WITH_FIELD and a bunch of others.
(We cannot use the compartively named case-insensitive operators, such as OperatorId.ICONTAINS, since the underlying database that we're using is in fact case sensitive. And we noticed that the ICONTAINS operator type causes the underlying SQL that is generated to unecessarily (and incorrectly) lowercase the text that a user enters ino the filter builder.)
Here's the code that we used...it's pretty straightforward we think:
Code:
... dsFilter.setFields(arraySetFilterDSFields); OperatorId[] operators = {OperatorId.AND,OperatorId.BETWEEN,OperatorId.BETWEEN_INCLUSIVE,OperatorId.CONTAINS,OperatorId.CONTAINS_FIELD,OperatorId.ENDS_WITH,OperatorId.ENDS_WITH_FIELD,OperatorId.EQUALS,OperatorId.EQUALS_FIELD,OperatorId.GREATER_OR_EQUAL,OperatorId.GREATER_OR_EQUAL_FIELD,OperatorId.GREATER_THAN,OperatorId.GREATER_THAN_FIELD,OperatorId.IN_SET,OperatorId.IS_NULL,OperatorId.LESS_OR_EQUAL,OperatorId.LESS_OR_EQUAL_FIELD,OperatorId.LESS_THAN,OperatorId.LESS_THAN_FIELD,OperatorId.NOT,OperatorId.NOT_CONTAINS,OperatorId.NOT_ENDS_WITH,OperatorId.NOT_EQUAL,OperatorId.NOT_EQUAL_FIELD,OperatorId.NOT_IN_SET,OperatorId.NOT_NULL,OperatorId.NOT_STARTS_WITH,OperatorId.OR,OperatorId.REGEXP,OperatorId.STARTS_WITH,OperatorId.STARTS_WITH_FIELD}; dsFilter.setTypeOperators(FieldType.TEXT, operators ); dsFilter.setTypeOperators(FieldType.BOOLEAN, operators ); dsFilter.setTypeOperators(FieldType.FLOAT, operators ); dsFilter.setTypeOperators(FieldType.INTEGER, operators ); dsFilter.setTypeOperators(FieldType.ANY, operators ); ...
Here's the version info requested:
SmartClient Version: SC_SNAPSHOT-2011-12-05/PowerEdition Deployment (built 2011-12-05)
Browser: Mozilla Firefox 4.0.1
Comment