2 Replies Latest reply on Sep 30, 2010 1:29 PM by Edilmar Alves

    a4j:poll x slow action of a4j:commandButton

    Edilmar Alves Expert



      I use RichFaces3.3.3 + JSF2.0.

      I have an a4j:commandButton with an action that needs to process many things.

      I would like to use a4j:poll + h:outputText, to show a message for the actual process running, for better user interface.


      Problem: when user clicks the button, the action runs, but reRender to activate the a4j:poll only occurs after action is finished.

      Then, no message appears during processing.


      I look at all livedemos from a4j:poll and a4j:push, but the action for commandButton in these demos is fast.

      I made a bean for a4j:poll livedemo "Server date", based on http://livedemo.exadel.com/richfaces-demo/richfaces/poll.jsf?c=poll&tab=usage

      First, I created a fast bean method and outputText worked fine, displaying the server date.

      Then, I put a Thread.sleep(10000) to simulate a slow bean method. The same problem occured, not displaying anything.


      I would like something like this:


      if "user cliks button" then

        "first activate the a4j:poll"

        "after run the slow action"



      Is there some way to do this?


      Thanks for any help.