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

<h:selectManyCheckbox> with value bound to an array of int fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.1.0
    • 1.1.2
    • JSR-127
    • None
    • Linux, JDK 1.5.0_05

    Description

      The Shale "use cases" example includes a page where an <h:selectManyCheckbox> component is bound to an array of int that represents selected values. A bug was reported against this app:

      http://issues/apache.org/bugzilla/show_bug.cgi?id=37361

      However, further investigation shows that this case works correctly with the JSF RI, leading to the belief that it represents an implementation error in MyFaces. See the above bug report for more details.

      For reference, the page includes the following component:

      <h:selectManyCheckbox id="categories" layout="pageDirection"
      value="#

      {dialog.data.categories}">
      <h:selectItems value="#{domains.supportedCategories}"/>
      </h:selectManyCheckbox>

      where the binding expressions point at values of the following types:

      * #{dialog.data.categories}

      points at an array of int representing
      the currently selected categories

      • # {domains.supportedCategories}

        points at an array of SelectItem,
        where the "value" property of each is an Integer representing the
        primary key for that category.

      Attachments

        1. myfaces-829-post-reorg.patch
          23 kB
          John Robert Fallows
        2. myfaces-829.patch
          24 kB
          John Robert Fallows

        Activity

          People

            schof Sean Schofield
            craigmcc Craig R. McClanahan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: