[richfaces-issues] [JBoss JIRA] Commented: (RF-4450) HtmlInputSpinner freaks out with formatted numbers

Richard Kennard (JIRA) jira-events at lists.jboss.org
Wed Sep 10 21:03:38 EDT 2008


    [ https://jira.jboss.org/jira/browse/RF-4450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12429025#action_12429025 ] 

Richard Kennard commented on RF-4450:
-------------------------------------

Update: much more serious, I've noticed the same problem if:

a) the field is a nullable type (Integer, Float, etc.) and is null to start with
b) whether nullable type of not, the user deletes everything in the text box and then tries to operate the spinner


> HtmlInputSpinner freaks out with formatted numbers
> --------------------------------------------------
>
>                 Key: RF-4450
>                 URL: https://jira.jboss.org/jira/browse/RF-4450
>             Project: RichFaces
>          Issue Type: Feature Request
>    Affects Versions: 3.2.2
>         Environment: All
>            Reporter: Richard Kennard
>            Priority: Minor
>   Original Estimate: 1 day
>  Remaining Estimate: 1 day
>
> HtmlInputSpinner completely loses the plot if it has a Converter attached that formats the number.
> For example, a Converter that formats the number from 1234 to $1,234.00 or 1234%. As soon as you click a spinner button, the value jumps to, say, 9E+2 or something, which I assume is a result of failure to parse the number. I appreciate that because the 'spinning' is client-side and JavaScript based it does not have access to the Converter to help it parse the number.
> However, it would be great to have some level of support such as:
> BEST: support formatted numbers directly (eg. HtmlInputSpinner.setNumberPattern)
> STILL GOOD: strip non-numeric characters when parsing the number (eg. $ and % and ,)
> OKAY: grab the original value server-side, pre-going through the Converter, and use that to drive the spinner's JavaScript (being wary, of course, if the user edits the value manually by typing in the text box)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list