6 Replies Latest reply on Jul 30, 2008 9:24 AM by nimo stephan

    Conversational Scope with JavaBeans

    Ryan McDonough Newbie

      I am trying to create a Seam component which is a plain old JavaBean. I have declared the component as such:


      @Name("presentationAction")
      @Scope(ScopeType.CONVERSATION)
      public class PresentationAction {
      
          @Logger
          private Log log;
          
          /**
           * The PresentationDAO is a Spring Bean using a Seam-Managed 
           * Hibernate Session
           */
          @In("#{presentationDAO}")
          public PresentationDAO presentationDAO;
      
          @DataModel("valueList")
          public List<PresentationValue> valueList;
      
          /**
           * The DataTable that the valueList is bound to
           */
          private UIDataTable valueTable;
      
          /**
           * The selected fund
           */
          @DataModelSelection("selectedObject")
          public PresentationValue selectedObject;
          
          /**
           * The list of fund components for the selected fund.
           */
          @DataModel("componentList")
          public List<Component<?>> componentList;
      
          /**
           * The selected fund component.
           */
          @DataModelSelection("componentList")
          private Component<?> selectedComponent;
      ...



      When I run it, the first request is fine. Subsequet requests yeild the following error:



      javax.el.PropertyNotFoundException: /presentation.xhtml @26,29 binding="#{presentationA 
      ction.valueTable}": Target Unreachable, identifier 'presentationAction' resolved to null 
              at com.sun.



      I should note that the DAO is a Spring bean which uses a Seam-Managed persistence context. I looked at chapter 7 of the new Seam in Action book and it alluded to the fact that there is something additional that needs to be taken care of with conversation-scoped JavaBean. But that was in Chapter 3 :( Any suggestions?


      Ryan-