myfaces-dev mailing list archives

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


Gabrielle Crawford updated TRINIDAD-1963:

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

> Handle empty string pattern in NumberConverter
> ----------------------------------------------
>                 Key: TRINIDAD-1963
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Components
>    Affects Versions:
>         Environment: environment independent
>            Reporter: Jing Wu
>            Assignee: Gabrielle Crawford
>             Fix For: 
>         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.

View raw message