You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2005/04/05 22:08:54 UTC

"revalidating" a form component

I have a case where I would like a submit listener to update some a
ValidField on a form. In this case, the ValidField has a validator that
indicates it is required. What is occurring is that the field is being
marked in error, so when I set the value into the object that backs the
ValidField, the new value is not being displayed. This is because the value
"recorded" by the validator is being used. I've developed a workaround that
allows me to manually check the value and then reset the field tracking
information in the validation delegate, but what I really want to do is
something like:

setFormComponentValue("inputField", "my new value")

And have all the validation rules, and binding work as if the "my new value"
had been posted from the browser. This would mean that by the time my
listener exits, the form will not have fields in error when correct values
are set by the listener.

I've been digging around in renderComponent() of AbstractTextField,
TextField, and ValidField, however I can't see anything obvious.

Does anybody have any suggestions?

Richard


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