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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to