6 Replies Latest reply on Mar 17, 2007 11:52 AM by Konstantin Kauz

    Converter

    Konstantin Kauz Novice

      I don't now why this doesn't work:


      view:

      <s:decorate>
       <h:selectOneMenu value="#{hmodel.selectedHersteller}" required="true">
       <s:selectItems value="#{kfzList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..."/>
       <s:convertEntity />
       </h:selectOneMenu>
       </s:decorate>





      @Name("hmodel")
      @Stateless
      public class HModel implements HModelInterface{
      
       @In(required=false)
       private Hersteller hersteller;
      
       @In(required=false)
       private KfzModel kfzmodel;
      
       @PersistenceContext
       private EntityManager em;
      
       @DataModel
       private List<Hersteller> kfzList;
      
       private String herst;
      
       @In
       private FacesMessages facesMessages;
      
       private Hersteller selectedHersteller;
      
       @Factory("kfzList")
       public void setHerKfz(){
       List<Hersteller> lher= em.createQuery("from Hersteller where akzept=true")
       .getResultList();
       this.kfzList = lher;
      
       }



      in the view i have a <s:messages and the message that has been show is invalid value.