2 Replies Latest reply on Feb 14, 2011 5:06 PM by anonyin

    Seam EVENT Scope


      I have a Seam POJO as shown below in EVENT Scope which I am using as an Action class. I pass the "id" from the xhtml and execute the getDetails Action and assign the result to "sectionList".
      public class SectionBean
         public void getDetails()
      private String id;
      private List<Section> sectionList;
      /*************pages.xml entry*************/
          <page view-id="/items.xhtml">
                 <navigation from-action="#{secBean.getDetails}">
                        <redirect view-id="/sector.xhtml"/> 
      /*************pages.xml entry*************/
      in the sector.xhtml I have a datagrid which access the list from the bean as follows.
      <rich:dataTable rows="10" value="#{secBean.sectionList}".......
      Data from sectionList gets displayed only if my bean is in the SESSION Scope, I want to use the EVENT scope for my bean and display the data in the xhtml.
      If I understand correctly my response is getting redirected to sector.xhtml and hence I am loosing the request data(sectionList).
      How do I acheive this functionality by keeping my bean in EVENT scope.  
      Thanks In Advance.

        • 1. Re: Seam EVENT Scope

          EVENT is not the scope you want.

          EVENT is just that it lasts for an event. Not across redirects or even across multiple events.

          PAGE and CONVERSATION scopes are longer lasting and may be what you are looking for. Read the Seam doco about these scopes and apply what you learn to help you get your desired functionality.

          Remembering of course that the conversation scope is very similar to page (across redirects) unless you promote it to long running via any of the different mechanisms available to do so.

          • 2. Re: Seam EVENT Scope