3 Replies Latest reply on Mar 8, 2009 10:24 PM by Tariq Ahsan

    Help for using selectOneMenu

    Tariq Ahsan Newbie
      Hello All!

      I am Seam newbie trying to use selectOneMenu to create a simple drop down menu on a page. Not sure if I am doing everything correctly. Anyway here's the codes I have so far -

      part of the my jpdl.xml file -
      <decision name="UserDecision" expression="#{mybean.actionindicator}" >
             <transition name="A" to="createEval" />
             <transition name="C" to="updateEval" />
             <transition name="D" to="deleteEval" />
         <decision name="createEval" expression="#{mybean.create()}" >
                 <transition name="abortOperation" to="return" />
             <transition name="success" to="MyResponse" />
             <transition name="failure" to="start" /   </decision>
      part of MyBean.java -

      public String getActionindicator() {
                return this.actionindicator;

      public void setActionindicator(String actionindicator) {
                this.actionindicator = actionindicator;

      and here's the content of the xhtml file -
      <h:selectOneMenu id="actionindicator" value="#{mybean.list}">
                          <s:convertEnum />
                           <s:enumItem enumValue="ONCE" label="Only Once" />
                           <s:enumItem enumValue="EVERY_MINUTE" label="Every Minute" />
                           <s:enumItem enumValue="HOURLY"       label="Every Hour" />                   

      Getting this error -
      java.lang.IllegalArgumentException: java.lang.String is not an enum type

      Though I am trying out using enumItem would like to know how I can use selectItem also.

      Thanking you for your help.