[ http://issues.apache.org/jira/browse/TAPESTRY-636?page=comments#action_12358111 ]
Kent Tong commented on TAPESTRY-636: ------------------------------------ Then how to handle this case: Suppose that there is a form that has contains input fields including one that should have say a credit card #. Clicking a checkbox will refresh the form to allow for some optional input fields. Suppose that a user has entered the initial part of the card # but it's incomplete yet, but notices that he needs the optional input fields. So he clicks that checkbox and the form is refreshed. The ideal response is that the partial card # entered is still displayed. But as the errors are cleared, the partial card # won't be displayed. > field input value is not used if the field is not in error > ---------------------------------------------------------- > > Key: TAPESTRY-636 > URL: http://issues.apache.org/jira/browse/TAPESTRY-636 > Project: Tapestry > Type: Bug > Components: Framework > Versions: 4.0 > Environment: Windows XP > Reporter: Kent Tong > Assignee: Howard M. Lewis Ship > Fix For: 4.0 > > This bug is related to bug TAPESTRY-549. After calling clearErrors(), the > errors are cleared and the input field values are still kept. When the > TextField renders the next, it should display its existing input field value, > but currently it will do so only when it is in error. The expected behavior > is that it should display its existing input field value as long as there is > a tracking for it. > The bug is in TranslatedFieldSupportImpl: > public class TranslatedFieldSupportImpl implements TranslatedFieldSupport > { > public String format(TranslatedField field, Object object) > { > IValidationDelegate delegate = field.getForm().getDelegate(); > //BUG: uses field input value only if it is in error > return delegate.isInError() ? delegate.getFieldInputValue() : > field.getTranslator().format( > field, > _threadLocale.getLocale(), > object); > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
