0 Replies Latest reply on Jun 5, 2007 1:41 PM by Torsten Fink

    problem with <s:convertEntity/>

    Torsten Fink Newbie

      Hi,

      I have a problem with the convertEntity-Tag. Maybe someone can help :-)

      This is the XHTML-code:

       <h:selectOneMenu
       id="teamSelect"
       value="#{offerhead1.selectedTeam}"
       required="true">
       <s:convertEntity />
       <s:selectItems value="#{itemCache.allTeams}" var="team"
       label="#{team.mnemonic}"
       noSelectionLabel="Please choose.." />
      </h:selectOneMenu>
      


      The data is loaded correctly from the database and displayed on the web page. This is the signature of the bean method:

      public class ItemCacheBean implements ItemCache {
       public List<Employee> getAllTeams() {
       ...
       }
      }
      


      This is the signature of the bean method for saving the selected item:
      @Name(Offerhead1Bean.NAME)
      @Stateful
      public class Offerhead1Bean implements Offerhead1 {
       public Employee getSelectedTeam() {...}
       public void setSelectedTeam(final Employee selectedTeam) {...}
      }
      


      Now the problem is that when I select an item and submit the form the validation fails and I get the message "Value is not a valid selection."

      Any ideas?

      Thanks,

      Torsten