myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabrielle Crawford (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (TRINIDAD-1963) Handle empty string pattern in NumberConverter
Date Wed, 24 Nov 2010 01:08:15 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gabrielle Crawford updated TRINIDAD-1963:
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0.4-core 
           Status: Resolved  (was: Patch Available)

> Handle empty string pattern in NumberConverter
> ----------------------------------------------
>
>                 Key: TRINIDAD-1963
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1963
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions: 2.0.0.3-core
>         Environment: environment independent
>            Reporter: Jing Wu
>            Assignee: Gabrielle Crawford
>             Fix For: 2.0.0.4-core 
>
>         Attachments: numconverter.patch
>
>
> "pattern" attribute of convertNumber component is defined of type String, thus if this
attribute is bound to an EL expression, the value will be evaluated to an empty string if
no value is obtained from that expression. Example: (here format property of Empno in bindings
is not defined, thus null, the the whole expression is evaluated to be an empty string because
the type is String)
>     <af:inputText value="#{bindings.Empno.inputValue}" label="#{bindings.Empno.hints.label}"
>                   required="#{bindings.Empno.hints.mandatory}"
>                   columns="#{bindings.Empno.hints.displayWidth}"
>                   maximumLength="#{bindings.Empno.hints.precision}"
>                   shortDesc="#{bindings.Empno.hints.tooltip}" id="it4">
>       <f:validator binding="#{bindings.Empno.validator}"/>
>       <af:attributeDragSource attribute="value"/>
>       <af:convertNumber groupingUsed="false" pattern="#{bindings.Empno.format}"/>
>     </af:inputText>
> Empty string of pattern causes all sorts of undesired behavior, we need to override getPattern()
method on NumberConverter so that empty string is treated as null.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message