Hi,
is there a possibility in SmartGWT to define a new operator with its own "editor" for FilterBuilder?
E.g. I need some operator for timestamp which would mean "In Previous N days/weeks" and it's editor would be one number input box and one combo for period selection
I found that it's possible to restrict operators valid for DataSource field, but I did not find any way how to define my own new operator.
Something like:
Thanks in advance,
Svatya.
is there a possibility in SmartGWT to define a new operator with its own "editor" for FilterBuilder?
E.g. I need some operator for timestamp which would mean "In Previous N days/weeks" and it's editor would be one number input box and one combo for period selection
I found that it's possible to restrict operators valid for DataSource field, but I did not find any way how to define my own new operator.
Something like:
Code:
[i]////////////////////////// // Create new operator "MY_NEW_OPERATOR" and register it /////////////////////////[/i] ... DataSource tmpDS = new DataSource(); DataSourceField tmpField = new DataSourceField("testField"); tmpField.setValidOperators(OperatorsId.EQUALS, [b]OperatorsId.MY_NEW_OPERATOR[/b]); tmpDS.addField(tmpField); FilterBuilder tmpFB = new FilterBuilder(); tmpFB.setDataSource(tmpFB); ...
Svatya.