4 Replies Latest reply on Sep 19, 2008 5:29 AM by scott duke

    Dropdown Lists for Searching

    Tom Longridge Newbie

      I am trying to amend a seam-gen generated search page for  our customer site entities to enable the user to select a country from a dropdown list rather than type it into a textbox.


      I've changed the inputText to a selectOneMenu on the List page:


      <h:selectOneMenu value=""#{siteList.site.country}">
          <s:selectItems value="#{currentcountries.resultList}" 
                           var="country"
                         label="#{country.name}"
              noSelectionLabel="-- Please Select --" />
          <s:convertEntity />
      </h:selectOneMenu>



      Where currentcountries is a simply query defined in the components.xml file. The country attribute is a Country object from a separate table in the database.


      When trying to submit the search, I get the following exception:


      Caused by javax.el.ELException with message: "java.lang.IllegalArgumentException: argument type mismatch"



      Which leads me to believe that this is not correct way of going about it. Can anyone point me in the right direction?