Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3127

Output a warning if selectOne renders no selected item

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1.0-SNAPSHOT
    • 4.0.0-RC5
    • General
    • None
    • myfaces core trunk

    Description

      Common problem:
      <h:selectOneMenu value="#

      {bean.selectedValue}

      " > <!-- bean.selectedValue has value 'C' -->
      <f:selectItem itemValue="A" ... />
      <f:selectItem itemValue="B" ... />

      if selectedValue is null or not "A" or "B", combo is rendered, but only looks like "A is selected", because browser (firefox, chrome) show the first OPTION element as selected. Then after next submit, the real value selection occurs and ValueChangeEvent is delivered.

      User don't expect that because he/she didn't touch the combo.

      Suggestion : render a warning in PROJECT_STAGE Development

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            markoc50 Martin Kočí
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: