[jboss-user] [JBoss Seam] - problem with <s:convertEntity/>

tnfink do-not-reply at jboss.com
Tue Jun 5 13:41:28 EDT 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4051477#4051477

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4051477



More information about the jboss-user mailing list