Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to addValidator in SmartGWT

    Please help me to understad how I can
    1) create my specific MyValidator that will extend a Validator class, and
    2) set my own type setAttribute("type", "myvalidatortype"),
    3) then provide FormItem with an array of Validators created from json-object like this
    [{"type":"contains","substring":"111"},{"type":"myvalidatortype"}]

    I do not understand how the string "myvalidatortype" is linked with MyValidator class. I read in the java-doc for Validator class something I guess can be related with this - "Custom validators can be reused on the client by adding them to the global validator list, via the Validator.addValidator method." But there is NO this method in the Validator class.

    Can anybody help me with this?
    Thank you in advance.
    Last edited by asg2007; 23 Jul 2010, 11:19.
Working...
X