tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Fwd: [jira] Created: (TAPESTRY-636) field input value is not used if the field is not in error
Date Sat, 10 Sep 2005 13:30:08 GMT
Ick; the machinations get more complicated.  

Perhaps what we need to do is, on rewind, discard the field tracking
for fields that pass validation.

We can then tweak the check from isInError() to hasInputValue() ...
which will only be true for fields that failed validation.

clearErrors() will keep the field trackings and field input values,
but set the error renderer to null.  I guess it should also remove any
unassociated errors.


---------- Forwarded message ----------
From: Kent Tong (JIRA) <tapestry-dev@jakarta.apache.org>
Date: Sep 9, 2005 10:24 PM
Subject: [jira] Created: (TAPESTRY-636) field input value is not used
if the field is not in error
To: tapestry-dev@jakarta.apache.org


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


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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org



-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Mime
View raw message