1 Reply Latest reply on Apr 10, 2008 1:33 PM by Damian Harvey

    Will the DataModel save data to db automatically?

    Anatorian Su Newbie
      <rich:dataTable value="#{action.contracts}" var="c">
         <h:inputText value="#{c.name}" />
       <h:commandButton action="#{action.save()}" value="save" />
      public class Action {
        private EntityManager em;
        private List<contract> contracts;
        public void create(){
          this.contracts = findAllConracts();
        public void findAllContracts() {
          em.createQuery("from Contract ").getResultList();
        public void save() {
          ;//I don't do anything here
      I edit the name and press save button, the new names were saved to the database. But I didn't do anything like "em.merge(..)", how can it save it?  Does seam save datamodel automatically ?