2 Replies Latest reply on Dec 7, 2007 1:35 PM by parki

    Newbie ajax design question

    parki

      Hello -

      I'm new to rich faces (and really to web development) and so I have a question that (I hope) is pretty simple.

      Let's say I have a tree which I want to display in RichFaces, so create a SimpleTreeBean as in the example, and all is fine.

      Now, if another process in the sever updates that tree model, I'd like to UI to reflect the change by causing an ajax-y update in the browser.

      It's unclear to me how this is best done in RichFaces - how do I cause the re-render to get invoked on the client side?

      Is there an example of an update that's not initiated by the browser?

      Thanks.

      parki...


        • 1. Re: Newbie ajax design question
          mail.micke

          Have aven't tried this myself yet, so I can only really make a suggestion.

          You should try the a4j:push component. The browser will periodically check/poll for new events on the server and if there are any perform relevant rerendering.

          You can also try a4j:poll which also periodically checks/polls the server. The difference is that a4j:poll will always cause a rerendering. I've used this component and it is dead simple.

          good luck

          • 2. Re: Newbie ajax design question
            parki

            Thanks - I'll look at doing a4j:poll or a4j:push.

            Cheers,

            parki...