bijection scope problem
tiamak May 8, 2009 12:16 PMhi,
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:
@Name("competitionCategories") public class CompetitionCategories { private List<Category> categoryList; @RequestParameter private Long competitionId; @In EntityManager entityManager; @Out(required=true,scope=ScopeType.CONVERSATION) DemandMode mode = DemandMode.STANDARD; // getters and setters }
the category display page:
<h:dataTable id="competitionCategories" var="cat" value="#{competitionCategories.categoryList}" rendered="#{not empty competitionCategories.categoryList}"> <h:column> <f:facet name="header">Name</f:facet> #{cat.name} </h:column> <h:column> <h:form> <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}"/> </s:link> </h:form> </h:column> </h:dataTable>
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:
@Name("competitionResults") public class CompetitionResults { @In(required=true) DemandMode mode; // TODO: making required=true and resolving the dependencies of all pointing pages @In(required=false) QueryParameterList params; @In(required=false) String whereClause; @RequestParameter Long competitionId; @RequestParameter Long category; @Logger Log log; @In Session termcompSession; @SuppressWarnings("unchecked") @In 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?
regards,
sb