4 Replies Latest reply on Dec 23, 2010 10:48 AM by Moacir da roza flores

    Questions about KeepAlive

    Moacir da roza flores Newbie

      Hi, there!


      First, sorry my bad english im from Brazil...


      I have two questions about keepalive:


      1- Whats the differences between keepalive annotation and tag? Because when i use keepalive tag, my application dont work, when i use annotation its works, i am using facelets.


      2- I have a problem, I need "clear" the saved state with keep alive, because:

      I have one page (registerpatients.jspx) , in this page, i have two panels(SearchPanel, EditPanel ), when i click on button to edit, i set rendered false to searchPanel, and set rendered true to editPanel, on edit panel i have two buttons(Save and Cancel ).


      <h:commandButton id="cancelButton" action="Home" value="Cancel"  immediate="true" />


      When i click on button cancel, i go to Home page, but when i try open again registerpatients.jspx, this page open directly with editPanel rendered.


      I cant do something like this:

      <h:commandButton id="cancelButton" action="registerPanelBean.setRenderedDefault" value="Cancel"  immediate="true" />


      Because, cancelButton is in a template, so, many others page use it.



      One more time, sorry my bad english!

      Moacir da Roza Flores