title: can't process persistAction.create
body: <p>i have a problem to make simple form web site in jsf.
  i use primefaces for button.
  when click button, why the program can't do persistAction.create in my code ?</p>
  
  <p>this is my html</p>
  
  <pre><code>    &lt;h:body&gt;
      &lt;p:layout fullPage="true"&gt;
          &lt;p:layoutUnit size="100" position="north"/&gt;
          &lt;p:layoutUnit size="300" position="west"/&gt;
          &lt;p:layoutUnit position="center"&gt;
              &lt;h:form id="frmDaftar"&gt;
                  &lt;p:panel id="panelList" style="width: 370px" header="Registrasi Mahasiswa Baru"&gt;
                      &lt;p:panelGrid  columns="2" style="border: #ffffff"&gt; 
                          &lt;p:outputLabel for="nim" value="NIM"/&gt;
                          &lt;p:inputText id="nim" value="#{mahasiswaController.selected.nim}" title="nim" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="nama_lengkap" value="Nama Lengkap"/&gt;
                          &lt;p:inputText id="nama_lengkap" value="#{mahasiswaController.selected.nama}" title="nama" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="tempatLahir" value="Tempat Lahir"/&gt;
                          &lt;p:inputText id="tempatLahir" value="#{mahasiswaController.selected.tempatLahir}" title="tempat_lahir" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="mask" value="Tanggal Lahir" /&gt;
                          &lt;p:calendar id="mask" value="#{mahasiswaController.selected.tanggalLahir}" title="tanggal_lahir" pattern="dd-MM-yyyy" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="fakultas"  value="Fakultas"/&gt;
                          &lt;p:inputText id="fakultas" value="#{mahasiswaController.selected.fakultas}" title="fakultas" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="jurusan" value="Jurusan"/&gt;
                          &lt;p:inputText id="jurusan" value="#{mahasiswaController.selected.jurusan}" title="jurusan" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="telepon" value="Telepon"/&gt;
                          &lt;p:inputMask id="telepon" mask="(9999) 9999-9999" value="#{mahasiswaController.selected.telepon}" title="telepon" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:outputLabel for="alamat" value="Alamat"/&gt;
                          &lt;p:inputTextarea id="alamat" value="#{mahasiswaController.selected.alamat}" title="alamat" required="true" requiredMessage="Please fill the blank field"/&gt;
                          &lt;p:spacer/&gt;
                          &lt;p:commandButton  actionListener="#{mahasiswaController.create()}" process="@this" value="Confirm" update="panelList" validateClient="true"/&gt;
                          &lt;p:commandButton value="Clear" update="panelList" actionListener="#{mahasiswaController.create()}"/&gt;
                      &lt;/p:panelGrid&gt;
                  &lt;/p:panel&gt;
              &lt;/h:form&gt;  
          &lt;/p:layoutUnit&gt;
      &lt;/p:layout&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>and bean</p>
  
  <pre><code>public class MahasiswaController implements Serializable {
  
  @EJB
  private com.nop.univ.MahasiswaFacade ejbFacade;
  private List&lt;Mahasiswa&gt; items = null;
  private Mahasiswa selected;
  
  
  public MahasiswaController() {
  }
  
  public Mahasiswa getSelected() {
      return selected;
  }
  
  public void setSelected(Mahasiswa selected) {
      this.selected = selected;
  }
  
  protected void setEmbeddableKeys() {
  }
  
  protected void initializeEmbeddableKey() {
  }
  
  private MahasiswaFacade getFacade() {
      return ejbFacade;
  }
  
  public Mahasiswa prepareCreate() {
      selected = new Mahasiswa();
      initializeEmbeddableKey();
      return selected;
  }
  
  Integer nim =0, header =1234;
  String tgl;
  Date date = new Date();
  SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm");
  
  private Integer findNim() {
      try {  
      items = getFacade().findAll();
      tgl = sdf.format(date).replace("/", "");
      tgl = tgl.substring(0, 8);
      nim = items.size();
      nim = Integer.parseInt(tgl) + header + nim;
      items =null;
      return nim;
      } catch (Exception e) {
  
      return null;
      }
  }
  
  private void save() {
      FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Data Saved"));
  }
  
  public void create() {
      //selected.setNim(findNim());
      persist(PersistAction.CREATE, ResourceBundle.getBundle("/Bundle").getString("MahasiswaCreated"));
      save();
      if (!JsfUtil.isValidationFailed()) {
          items = null;    // Invalidate list of items to trigger re-query.
      }
  }
  
  public void update() {
      persist(PersistAction.UPDATE, ResourceBundle.getBundle("/Bundle").getString("MahasiswaUpdated"));
  }
  
  public void destroy() {
      persist(PersistAction.DELETE, ResourceBundle.getBundle("/Bundle").getString("MahasiswaDeleted"));
      if (!JsfUtil.isValidationFailed()) {
          selected = null; // Remove selection
          items = null;    // Invalidate list of items to trigger re-query.
      }
  }
  </code></pre>
  
  <p>can anyone help me for my problem, beacause when i debug the program actually the program do persistAction.create, but when i check in my table is nothing</p>