1 Reply Latest reply on Jun 29, 2009 3:49 AM by ilya_shaikovsky

    How to display the buttons Dynamically in the ModelPanel

      HI

      I have 2 buttons NEW n EDIT button to my table,
      When i click on NEW button ,a ModelPanel is displayed with UPDATE,SAVE n CANCEL buttons .....
      When i click on EDIT button , the same ModelPanel is displayed with the same UPDATE,SAVE n CANCEL buttons ....

      but my requirement is

      When i click on NEW button ,in the ModelPanel ,SAVE n CANCEL Should appear with out UPDATE button .....
      When i click on EDIT button ,in the same ModelPanel UPDATE n CANCEL should appear without SAVE button ....

      this are the buttons in the modal panel


      <a4j:commandButton
      value="#{messages['toms.application.label.button.Update']}"
      action="#{equipmentTypeAction.update}"
      oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />

      <a4j:commandButton
      value="#{messages['toms.application.label.button.Save']}"
      action="#{equipmentTypeAction.persist}"
      oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />

      <a4j:commandButton
      value="#{messages['toms.application.label.button.Cancel']}"
      action="#{equipmentTypeAction.cancel}" bypassUpdates="true"
      oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('editPanel')}.hide();" />


      any idea for me ,how to i proceed for this ................

      Thnks n Regards
      JJ