I have a rather large implementation of a SmartGWT FilterBuilder
, pretty similar to the Big Filter example in the SmartGWT showcase. The FilterBuilder
uses a RestDataSource
underneath to create it's fields via FormItem
s with operators and available values, some of which are pulled from the server and other's that are created by client-side data (i.e. a ComboBoxItem
with options from a ValueMap
). I currently make requests to the server based on the underlying criteria and that works just fine. Now, I want to prevent my query button from performing it's onclick
handler when the values in the FormItems are invalid. I've been able to successfully add Validator's to some of the FormItem
s and DataSourceField
s, and I can see in the GWT debugger that I am getting "invalid" returned from CustomValidator
's condition, yet, when I call filterBuilder.validate()
I always get back true
(even with clearly invalid values in fields).
What gives? How can I validate on a FilterBuilder
?