Ok found a Solution...

a cycle().commitPageChanges() dit the Job.... 
quess that a getDelegate().record(***) also calls cycle.commitChanges()...
not sure why getDelegate().recordFieldInputValue(null); doesnt do.




Skorpien126 wrote:
> 
> Why does this Code in my RegisterPage doesn´t work:    
> 
>         IFormComponent componentPassword = (IFormComponent)
> getComponent("password");
>       IFormComponent componentPasswordConfirm = (IFormComponent)
> getComponent("passwordConfirm");
>               
>       if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
>         {
>               getDelegate().setFormComponent(componentPassword);
>       
> getDelegate().record(getText("validator.passwordMissmatch"),ValidationConstraint.CONSISTENCY);
>                       
>               getDelegate().setFormComponent(componentPasswordConfirm);
>       
> getDelegate().record(getText("validator.passwordMissmatch"),ValidationConstraint.CONSISTENCY);
>                         
>         }
>               
>       //check if there is an error... in password confirm or other input
> fields... if yes 
>       if (getDelegate().getHasErrors())
>       {
>               getDelegate().setFormComponent(componentPassword);
>               getDelegate().recordFieldInputValue(null);
>                       
>               getDelegate().setFormComponent(componentPasswordConfirm);
>               getDelegate().recordFieldInputValue(null); 
>       return;
>       }
> 
> whereas this works.
> 
>         if (!StringUtils.equals(getPassword(),getPasswordConfirm()))
>         {
>               getDelegate().setFormComponent(componentPassword);
>                 getDelegate().recordFieldInputValue(null);
>       
> getDelegate().record(getText("validator.passwordMissmatch"),ValidationConstraint.CONSISTENCY);
>                       
>               getDelegate().setFormComponent(componentPasswordConfirm);
>                 getDelegate().recordFieldInputValue(null);
>       
> getDelegate().record(getText("validator.passwordMissmatch"),ValidationConstraint.CONSISTENCY);
>                         
>         }
> 
> it seems so strength....
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Validation.setFormComponent-works-only-Once----tf3526275.html#a9853301
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to