jsf - Replace a form with a text -


i have <form> user can input data. when inputs right data , user presses button, want replace <form> thank message. in fact <div> container text inside should appear.

what ways realise in primefaces 3.5 or jsf?

  • suppose have parent div in 2 divs there. 1 form , 1 thank message.
  • first, set form panel visible , thank message invisible.
  • if form submitted, change backing bean value true responsible displaying thank message.
  • now, after form submitted, change panel's visibility false , thank message visibility true.

       <p:outputpanel id="parentpanel">      <p:outputpanel id="formpanel" rendered="#{bean.render eq '1'}">            //your form here      </p:outputpanel>      <p:outputpanel id="textpanel" rendered="#{bean.render eq '2'}">            //your thank message here      </p:outputpanel>   </p:outputpanel>  

here, render attribute in bean change 1 to2 after form submitted.


Comments