1 Reply Latest reply on May 10, 2009 8:28 PM by Hugo Pragt

    bijection scope problem

    Simon Bailey Newbie


      i'm having a problem with bijection in conversation scope. i have two beans, one which is accessed from the first page and shows a list of categories, this bean oujects an Enum value to conversation scope:

      public class CompetitionCategories {
           private List<Category> categoryList;
           private Long competitionId;
           EntityManager entityManager;
           DemandMode mode = DemandMode.STANDARD;
              // getters and setters

      the category display page:

      <h:dataTable id="competitionCategories" var="cat"
        rendered="#{not empty competitionCategories.categoryList}">
          <f:facet name="header">Name</f:facet>
            <f:facet name="header">Actions</f:facet>
            <s:link id="categoryResults" value="View Results"
              view="/competition/competitionResults.xhtml" propagation="join">
              <f:param name="category" value="#{cat.categoryId}" />
              <f:param name ="competitionId" value="#{competitionCategories.competitionId}"/>

      categoryList.xhtml has #{conversation.begin} setup in pages.xml, links to competitionResults.xhtml propagate the conversation. i have the following bean referenced from competitionResults.xhtml:

      public class CompetitionResults {
           DemandMode mode; // TODO: making required=true and resolving the dependencies of all pointing pages
           QueryParameterList params;
           String whereClause;
           Long competitionId;
           Long category;
           Log log;
           Session termcompSession;
           CacheProvider cacheProvider;
              // getters, setter, businessmethods

      if i inspect the conversation in debug.seam, i can see that mode has been outjected into the conversation scope, but it is not being injected into CompetitionResults.java. if i change the declaration in CategoryList.java to @Out(scope=ScopeType.SESSION) it does get injected.

      what am i doing wrong? am i doing anything wrong?


        • 1. Re: bijection scope problem
          Hugo Pragt Newbie


          Can you be sure that bothe outjection and injection occur to the same conversation?
          Chances are you're outjecting to one conversation and expecting a injection in another conversation.

          Just a hunch, but do you actually start or join a long-lived conversation? (@Begin)

          hope I could be of some sort of help,