tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Ferraro (JIRA)" <tapestry-...@jakarta.apache.org>
Subject [jira] Created: (TAPESTRY-633) Default behavior of NumberTranslator treats zeros asymmetrically.
Date Fri, 09 Sep 2005 17:44:30 GMT
Default behavior of NumberTranslator treats zeros asymmetrically.
-----------------------------------------------------------------

         Key: TAPESTRY-633
         URL: http://issues.apache.org/jira/browse/TAPESTRY-633
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
    Reporter: Paul Ferraro
    Priority: Minor


The default behavior of the NumberTranslator uses omitZero = true.  I think that special treatment
of zero values should not be the default behavior of NumberTranslator so that default behavior
is entirely predicatable.
Also, omitZero=true creates undesirably asymmetric behavior for processing zeros when you
investigate a parse/format/parse cycle.
If I enter a zero into a TextField that uses the NumberTranslator it gets parsed as a 0, when
that 0 value is formatted for display, it will be formatted as "" even though it was entered
and submitted as zero.  Upon resubmitting this value, without and changes, the "" will be
parsed as a null.  This means that the parsed value can change even though the text value
was never altered.  I think this is bad and should not be the default behavior of NumberTranslator.
 I suggest defaulting omitZero to false.  Also, it would make more sense that if omitZero
were true, then empty text values should be parsed as 0's.  This would create symmetric behavior
even when omitZero is true.

-- 
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


Mime
View raw message