4 Replies Latest reply on Jun 18, 2010 1:51 AM by Lorenzo Avoledo

    Read list of strings from components.xml

    Lorenzo Avoledo Newbie
      I'm new to seam.
      I added in my components.xml this component:

              <component name="skinEditor">
                      <property name="availableSkins">
                              <key>classic</key><value>classic</value>
                              <key>plain</key><value>plain</value>
                              <key>emeraldTown</key><value>emeraldTown</value>
                              <key>blueSky</key><value>blueSky</value>
                              <key>wine</key><value>wine</value>
                              <key>japanCherry</key><value>japanCherry</value>
                              <key>ruby</key><value>ruby</value>
                              <key>laguna</key><value>laguna</value>
                              <key>deepMarine</key><value>deepMarine</value>
                              <key>darkX</key><value>darkX</value>
                              <key>glassX</key><value>glassX</value>
                      </property>
              </component>

      How can i have to reference this component in my code or in my jsf pages?
      I put in my page this code:

      <h:selectOneMenu value="#{skinBean.skin}">
              <f:selectItems value="#{skinEditor.availableSkins}"></f:selectItems>
      </h:selectOneMenu>

      but i get this error:
      java.lang.IllegalArgumentException: Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(j_id10).  Found null.

      Thanks in advance for your help
      Lorenzo