5 Replies Latest reply on Oct 12, 2007 2:01 AM by Louis Coetzee

    DataModel in two SFSB issues (regression)

    Louis Coetzee Apprentice

      Hi,

      some time ago I ran into this problem (which was fixed in CVS), but seems to have re-appeared with Seam 2.0 CR2

      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106625

      Briefly...
      I have a SFSB (questionnaireManagementBean) where I create/populate a datamodel ("sections"), which is outjected and used on my xhtml page. From that page (in the same conversation) I execute a method in another SFSB (sectionManagementBean)(where I use the previously outjected datamodel). At this point the datamodel is not available in sectionManagementBean anymore (in previous CVS builds this variable was available (but I dont know when this stopped working again)).

      The source code:

      @Stateful
      @Name("questionnaireManagementBean")
      public class QuestionnaireManagementBean implements QuestionnaireManagement {
      
       @DataModel
       private List<Section> sections;
      
      .
      .
      .
      }
      


      @Stateful
      @Name("sectionManagementBean")
      public class SectionManagementBean implements SectionManagement {
       @DataModel(value="sections")
       private List<Section> sections;
      
       @DataModelSelectionIndex(value = "sections")
       private int selectedSectionNr;
      .
      .
      }


      When I look at the variables in the conversation context injected into the sectionManagementBean I see the "sections" in the conversation context as:
      INFO[csir.questionnaire.management.seam.SectionManagementBean] questionnaireManagementBean.sections


      and not as just a normal "sections". Thus the variable is null (which results in all sorts of nasty things.)

      Any suggestions ?

      Thanks

      Louis