2 Replies Latest reply on Mar 28, 2011 9:04 AM by lvdberg

    Seam Session Refresh - pls help

    khannap2001

      I have a list of users in session. I want to provide refresh functionality on my web page so that when user clicks refresh then session is cleared and page is reloaded with new data.



      How can i achieve this in seam?
      I am new to seam and desperately needs help.

        • 1. Re: Seam Session Refresh - pls help
          tausuahmed

          Hi,


          You have to be more clear on your problem.

          As of now i think this might help you,


          1. Maintain a object list in session scope, add all your relevant data in method annotated as @Create.


          2. On click of a link call a method and reset the values of list.


          Thanks,
          Tauseef





          • 2. Re: Seam Session Refresh - pls help
            lvdberg

            Hi,


            I assume that your list is updated from another page, by another user. In that case you should look at the push-functionality of richfaces. It helpd you to create a auto-refresh, without re-loading your page. The provided examples is very clear, but you need some additional work at the Seam-side. Read the chapters on the unwrap and factory annotations (or get the Seam in Action book)  You basically need a bean which manages the user list and sends an event when the list is changed. Send an EVENT after change and let the ajax refresh bean listen to it.


            That's basically all thre is. Don't hesitate to ask for help, but please read carefully the excellent documentation and use the examples of the distro before asking more.


            Leo