javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-1191

SelectMany with generic collection results in ClassCastException

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Glassfish 3.12

      Description

      Using a generic wrapper class similar to java.util.Map.Entry with a collection as generic value argument within a selectmany-component will result in following ClassCastException on submit:

      Bean.java
      private List<String> values;
      
      private Entry<TestType, List<String>> entry;
      
      site.xhtml
      <h:selectManyMenu value="#{bean.entry.value}">
      	<f:selectItems value="#{bean.values}"
      		var="var" itemLabel="#{var}" itemValue="#{var}"/>
      </h:selectManyMenu>
      

      "java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.util.Collection"

      (the Entry class does not works since it does not follows bean conventions, but its just for understanding of the generic problem)

        Activity

        Hide
        Ed Burns added a comment -

        Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

        Show
        Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
        Hide
        Manfred Riem added a comment -

        Setting priority to Major

        Show
        Manfred Riem added a comment - Setting priority to Major

          People

          • Assignee:
            Unassigned
            Reporter:
            djmj
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: