Hi,
The code in the AsyncValidator is not much different from the timer code.
Just replace the timer with an async call to your backend and thats it. And
I think its important to do that sync because you don't want the UI to
freeze until you server has done the validation.

Here is some maybe not working code because it's untested and I just want to
show you the idea:

new qx.ui.form.validation.AsyncValidator(
  function(validator, value) {
    var req = new qx.io.remote.Request("my.server.url?v=" +
encodeURIComponent(value), "GET");
    req.addListener("complete", function(e) {
      var valid = e.getData();
      validator.setValid(valid);
    });
    req.send();
  }
);


Regards,
Martin
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Form-validation-question-tp5161999p5180646.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to