Validate Event

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Validate Event

滕训华
I have three textField in my page and in my validate event I write:

 

         Private String component1;

         Void onValidate(){

                  System.out.println(component1)

}

 

The result is outputing the value of the component1 three times,but the
first time its value is null and other two times is the right value,why and
how can I get the right value in the first time?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Validate Event

Sven Homburg
here is an little example, but if you read the docs
you can answer  the question by your self

@Persist
@Property
private String valueForComponent;

@Component(parameters = {"value=valueForComponent"})
private TextField inputComponent;

void onValidateFromInputComponent()
{
     System.out.println(valueForComponent)
}


2008/7/7 滕训华 <[hidden email]>:

> I have three textField in my page and in my validate event I write:
>
>
>
>         Private String component1;
>
>         Void onValidate(){
>
>                  System.out.println(component1)
>
> }
>
>
>
> The result is outputing the value of the component1 three times,but the
> first time its value is null and other two times is the right value,why and
> how can I get the right value in the first time?
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com
Loading...