You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ca...@usitc.gov on 2006/10/24 16:06:16 UTC

IValidationDelegate.clearError() clears user input on form refresh

PAGE SET UP
I have a form with an input field and two select fields.

The input field has an email validation.  This is defaulted to the users
email (user object is placed in session by successful login).

The first select field has an onchange JS handler that forces the form
to refresh.

The second select field is populated based on the option selected in the
first select field.

For various reasons AJAX is not an option - we are round tripping to the
server to update the page.

We call IValidationDelegate.clearErrors() as per JavaDocs in the form's
refresh handler -
http://tapestry.apache.org/tapestry4/tapestry/apidocs/org/apache/tapestr
y/valid/IValidationDelegate.html#clearErrors()

USE CASE
1 - The user enters an incorrect email address in the input field.
2 - The user selects a value in the first select field.

Since the input field fails validation the email address property on the
page is not updated.  When the page refreshes no errors messages are
displayed (which is anticipated behavior) but the value of the input
field does not match the user input submitted in the request.  It is the
original default email set when the page was first loaded.

In the case of the "refresh" I would like to ignore the errors but
maintain the user input . . . even when it is wrong.

Does anyone have a simple workaround to this?

It seems that this has already been entered into JIRA as a bug -
http://issues.apache.org/jira/browse/TAPESTRY-867

Carlos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: IValidationDelegate.clearError() clears user input on form refresh

Posted by Karthik N <ka...@gmail.com>.
any  user/password that can be used for voting?

On 10/25/06, andyhot <an...@di.uoa.gr> wrote:
>
> Please vote for this issue... it might get resolved faster :)
>
>
> Karthik N wrote:
> > carlos, any solutions you found?
> >
> > Thanks, Karthik
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Thanks, Karthik

Re: IValidationDelegate.clearError() clears user input on form refresh

Posted by andyhot <an...@di.uoa.gr>.
Please vote for this issue... it might get resolved faster :)


Karthik N wrote:
> carlos, any solutions you found?
>
> Thanks, Karthik
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: IValidationDelegate.clearError() clears user input on form refresh

Posted by Karthik N <ka...@gmail.com>.
carlos, any solutions you found?

Thanks, Karthik