2 Replies Latest reply on Jun 6, 2007 8:38 PM by vivian hu

    <a4j:keepAlive> question

    vivian hu Novice

      I used the following to make a wizard work.

      <a4j:keepAlive beanName="addDesktopBean" />

      The problem is, every time user click on "Cancel", I need to go to my server side bean to clear up all the fields that user has entered already.
      Is there a way to just stop this bean from being "alive", so the next time, it will be created again, so all the field inside the bean is automatically clearned?

        • 1. Re: <a4j:keepAlive> question
          Sergey Smirnov Master

          keepAlive has ajaxOnly attribute. If it set to true, the previous state of the bean will not restored during the regular (non-ajax) request.

          • 2. Re: <a4j:keepAlive> question
            vivian hu Novice

            If the following AJAX call? I have <a4j:keepAlive beanName="vcBean" ajaxOnly="true"/>

            But when I kit the OK button, I can see a new vcBean is created.

             <tr><td><h:outputText value="#{bundle.confirmVC}"/></td></tr>
             <td align="center">
             <a4j:commandButton actionListener="#{vcBean.saveVC}"
             reRender="vcTable,editVcMp,error" >
             <rich:spacer height="4px" width="10px"></rich:spacer>