4 Replies Latest reply on May 5, 2008 6:08 PM by infinity2heaven

    Unable to persist form values using EntityHome.persist

    infinity2heaven Novice

      Seam - 2.0.1GA
      JBoss - 4.2.2


      <a4j:commandButton id="save" value="Save"
           action   = "#{fundPerformanceHome.persist}"                    
           rendered = "#{!fundPerformanceHome.managed}"
           reRender = "addFofPerf"/>
           ....
           ....
           ....
      <a4j:outputPanel id="addFofPerf">
           <s:decorate template="WEB-INF/view/templates/decorateField.xhtml">     
           <ui:define name="label">Fund Name</ui:define>
           <h:selectOneMenu value="#{fundPerformance.fund}">
                <s:selectItems value="#{fundsQuery.resultList}" var="fund" label="#{fund.name}" noSelectionLabel="Please select" />
              <s:convertEntity />
           </h:selectOneMenu>
           </s:decorate>
           <s:decorate template="WEB-INF/view/templates/decorateField.xhtml">                 
                <ui:define name="label">Initial Investment Date:</ui:define>
                <rich:calendar id="date" datePattern="MMM/yyyy"
                     value="#{fundPerformance.initialInvestmentDate}"/>
           </s:decorate>
           <s:decorate template="WEB-INF/view/templates/decorateField.xhtml">                 
                <ui:define name="label">Time Period:</ui:define>
                <rich:calendar id="date" datePattern="MMM/yyyy"
                     value="#{fundPerformance.timePeriod}"/>
           </s:decorate>
           ....
           ....
           .... other entity properties ...
      <a4j:outputPanel



      Sample contents from components.xml,


      <framework:entity-query name="fundsQuery" ejbql="select f from Fund f" />
      <framework:entity-home name="fundPerformanceHome" entity-class="xxx.entity.FundPerformance" />
      <factory name="fundPerformance" value="#{fundPerformanceHome.instance}" scope="event"/>
      ...
      ...



      I'm able to save an instance of FundPerformance but it's an empty row in the database. The only two fields populated are createdBy and createdDate which is a @PrePersist annotation in my entity class


      What am I missing?


      within the same environment setup, I'm able to invoke a SFSB seam component, action handler as well EJBQuery methods.