0 Replies Latest reply on Apr 14, 2010 10:18 AM by Uros Majeric

    f:event preRenderView with f:ajax

    Uros Majeric Newbie

      This post is little off-topic, but anyway:
      I have a metadata defined on page:

          <f:event type="preRenderView" listener="#{controller.refresh}"/>

      a button:

      <h:commandLink id="btn1" action="#{item.setValue(null)}" value="delete" >
          <f:ajax render="@form"/>

      and a primefaces button:

      <p:commandLink id="btn2" action="#{item.setValue(null)}" value="delete" update="@form"/>

      my problem is when I press btn1 my method (controller.refresh) get called everytime (not only first time I get to the page), but when I press btn2 the same method is called only the first time. Where is the difference?

      I wan't to have btn1 without calling this method every time.

      thanks, Uros