When using form field validate events, you receive the value as a parameter
of its event handler method. The value typed by the user is only set to the
edited property if the validation passes.


On Fri, Dec 27, 2013 at 5:30 AM, Zhou Yongcheng <zhou.yongch...@gmail.com>wrote:

> when execute component self validate, can not get the input value.
> the following is the detail, I input 200 on the age textfield. but age = 0
> in onValidateFromAge() method, stranger.
>        @Log
> void onValidateFromAge() throws ValidationException {
> log.debug("age = " + age);   // NG  expected = 200, result = 0
> if (age > 100) {
> throw new ValidationException("age must be less 100");
> }
> }
>  @Log
> void onValidateFromInputForm() throws ValidationException {
> log.debug("ageForm ---" + age);   // OK expected = 200, result = 200
> log.debug("nameForm ---" + name);
> if ("refused".equals(name)) {
> throw new ValidationException("you have been refused!");
> }
> log.debug("----------after validate-----------");
> }
>



-- 
Thiago

Reply via email to