5 Replies Latest reply on Sep 17, 2009 4:50 PM by Jeryl Cook


    michele giuliano Newbie

      i'm new of seam and jboss developer. I want to create a search form and display results with datatable.
      I don' want to use EntityQuery like wizard of developer.
      In my form i have a
      It doesn't work.
      it depends because form is not associated with entity?

      And can someone gime me an example of usage.
      thanks in advance

        • 1. Re: s:convertEntity
          System Administrator Expert
          <h:selectManyListbox size="10" value="#{member.roles}"> 
               <s:selectItems var="r" value="#{availableRoles}" label="#{r.name}"/> 

          <h:selectOneMenu value="#{person.continent}" required="true">
                <s:selectItems value="#{continents.resultList}" var="continent"
                               noSelectionLabel="Please Select..."/>
                <s:convertEntity />

          • 2. Re: s:convertEntity
            michele giuliano Newbie

            Hi, thanks for the answer but i had done as you wrote me.
            I have a page that contains this code

                  <h:selectOneMenu value="#{hotelSearch.pippolo}"> 
                   <s:selectItems value="#{hotelSearch.capitalsList}" var="continent" 
                             noSelectionLabel="Please Select..."/>
                <s:convertEntity />   

            and an ejb like this

            public class UtiSearchAction implements UtiSearch
               private EntityManager em;
               private Countries pippolo;
               private List<Countries> capitalsList;
               public void init() {
                    capitalsList = em.createQuery("select c from Countries c ").getResultList();
                    pippolo = new Countries();
                    pippolo = capitalsList.get(1);
               private List<Locations> hotels;
               public List<Countries> getCapitalsList() {
                 return capitalsList;
            public void setCapitalsList(List<Countries> capitalsList) {
                 this.capitalsList = capitalsList;
            public Countries getPippolo() {
                 return pippolo;
            public void setPippolo(Countries pippolo) {
                 this.pippolo = pippolo;

            when i load data for dropdown all is ok: when dropdown put value (i think) i get this error

            value is not valid

            i don't understand where is the error.

            • 3. Re: s:convertEntity
              System Administrator Expert

              that indicates that the data value for the drop-down is invalid.  find out what the data value is.  also, are you using any validators or Hibernate validators?

              • 4. Re: s:convertEntity
                michele giuliano Newbie

                i found that problem is in

                public boolean equals(Object object)

                of Entity object ( as i read in other forum).
                Data value is ok, if i override that method (and return true) all is ok.
                Bu this is not a solution.
                Can you help me ?

                • 5. Re: s:convertEntity
                  Jeryl Cook Newbie

                  I think your missing the id attribute.

                        <h:selectOneMenu value="#{hotelSearch.pippolo}"> 
                         <s:selectItems value="#{hotelSearch.capitalsList}" 
                                         noSelectionLabel="Please Select..."/>
                           <s:convertEntity />