6 Replies Latest reply on Oct 8, 2012 9:10 AM by davidfaulstich

    Seam 2.3, JSF 2.0 - Conversation propagation for <h:selectOneMenu />


      I'm in the process of migrating our primary application from Seam 2.2 to Seam 2.3beta1, in order to get some of the benefits of JSF 2.0 and JPA 2.0. For the most part, it's going smoothly. However, some of the Ajax changes in JSF 2.0 and Richfaces 4.x are proving to be problematic in porting the code.

      I have a series of components that are populated based on the contents of the others. For example, the first menu selects the item category. When a value is selected, the subcategories of that category are retrieved from the database and act as the selection items for the second menu. This entire process is Conversation scoped. Currently, the code looks like this:

      <h:selectOneMenu value="#{newObjAction.category}"
      ="You must select a category"
      <s:selectItems var="cat"
      ="#{newDesignAction.designCategories}" label="#{cat.name}"
      ="Select a category..."
      ="true" />
      <s:convertEntity />

      <a:support event="onchange" reRender="subCategoryPanel"
      ="true" ajaxSingle="true" status="subCategoryStatus" />

      This works with no problem in Seam 2.2 with JSF 1.2. However, has been removed from JSF 2.0. I've tried something like this in its place:

      <f:ajax listener="#{newObjAction.handleCategoryChange}">

      It fires the event as expected, but there's one large problem: it is not propagating the conversation. As a result, when the listener object is about to be called it is intercepted and the user is redirected to the defined no-conversation-view-id from pages.xml. Is there any way to propagate the conversation when using <f:ajax />? Is there a better way to accomplish this? At this point the entire migration is at a stand still, as this is a major component in the application.

      I'd REALLY appreciate any help or advice.