Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14129

rich:select list doesn't opens, if first element in the list is empty (with solution)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.5.8
    • Fix Version/s: 4.5.9
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows 7 / JBoss EAP 6.4.0 / JSF 2.2.12

    • Steps to Reproduce:
      Hide
      <rich:select enableManualInput="true">
          <f:selectItem itemLabel="" />
          <f:selectItem itemLabel="Option 1" />
          <f:selectItem itemLabel="Option 2" />
      </rich:select>
      

      1. Click on the "Button" on the UI or in the input.
      2. Item List doesn't open, Firebug says, that variable "item" is undefined on select.js:359

      Show
      <rich:select enableManualInput= "true" > <f:selectItem itemLabel="" /> <f:selectItem itemLabel= "Option 1" /> <f:selectItem itemLabel= "Option 2" /> </rich:select> 1. Click on the "Button" on the UI or in the input. 2. Item List doesn't open, Firebug says, that variable "item" is undefined on select.js:359

      Description

      If the first element in the Item List is empty, popup with item list doesn't open by click on the "Button". Solution was found, but need to be commited in Upstream.

      File: richfaces-4.5.8.Final.jar/META-INF/resources/org.richfaces/select.js
      Line: 359
      Replace:

      return item.label === label && item.value == this.getValue();

      With:

      return item != null && item.label === label && item.value == this.getValue();

      Here was missed the check, that item is not null before.
      I hope to see that fix in next release. Thank you very much.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michpetrov Michal Petrov
                Reporter:
                sunrisecoder Alexander Gribanov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: