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
Do you calling the modal panel via ajax? Then you could pass some parameter and conditionally render the buttons according to the parameter using construction like rendered="#{bean.newMode}"