Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0.0-beta-1
-
None
-
environment independent
Description
"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="#
"
columns="#
"
maximumLength="#
"
shortDesc="#
" id="it4">
<f:validator binding="#
"/>
<af:attributeDragSource attribute="value"/>
<af:convertNumber groupingUsed="false" pattern="#
"/>
</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.