Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7DR#2
    • Fix Version/s: 1.7
    • Component/s: None
    • Labels:
      None
    • Environment:
      Apach 6.0.14, ice 1.7DR2, jsf 1.2.04

      Description

      When users got slectitems with null like:
        <f:selectItem itemValue="" itemLabel="op default" />
        <f:selectItem itemValue="0" itemLabel="op1" />
        <f:selectItem itemValue="1" itemLabel="op2" />

      may see this error:
      java.lang.NumberFormatException: For input string: ""
      java.lang.NumberFormatException.forInputString(Unknown Source)
      java.lang.Integer.parseInt(Unknown Source)
      java.lang.Short.parseShort(Unknown Source)
      java.lang.Short.valueOf(Unknown Source)
      java.lang.Short.valueOf(Unknown Source)
      com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.isConversionMatched(MenuRenderer.java:663)
      com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.isSelected(MenuRenderer.java:469)

      With class version of this list like <f:selectItems> these errors are not occurs.

      I think that this patch should be added to file
      com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.java

      Around line 649-653

          private boolean isConversionMatched(String sentinel, Object selectedValue){
           boolean match = false;
      > if (sentinel!=null && sentinel.length()==0 && selectedValue==null){
      > match = true;
      > } else
           if (selectedValue instanceof Long){
           if (selectedValue.equals(Long.valueOf(sentinel))) {
      1. MenuRenderer.java
        28 kB
        Krashan Brahmanjara

        Activity

        Krashan Brahmanjara created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Mark Collette [ mark.collette ]
        Krashan Brahmanjara made changes -
        Attachment MenuRenderer.java [ 10874 ]
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.7 [ 10080 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Mark Collette [ mark.collette ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: