4 Replies Latest reply on Feb 16, 2012 4:58 AM by plouw

    JSF Component binding with conversation scope seam component

    ryildirim

      I use JBoss 4.0.5, Seam 1.2.1 and a seam-gen generated application. My application uses ajax4jsf heavily and I suspect this problem might be related with the conversation propagation with the ajax4jsf requests.

      When I try to use component binding
      <rich:dataTable value="#{girisHome.girisHarekets}" binding="#{ajaxSupport.dataTable}".....

      and ajaxSupport is like

      @Name("ajaxSupport")
      @Scope(ScopeType.CONVERSATION)
      public class AjaxSupport {
      private UIData dataTable;
      ......

      The page loads okay for the first time, because it creates the non-existent conversation scoped ajaxSupport component and binds the jsf component to the dataTable property of the seam component. However, subsequent request to the same page results in:

      javax.faces.el.PropertyNotFoundException: /GirisEdit.xhtml @206,53 binding="#{ajaxSupport.dataTable}": Target Unreachable, identifier 'ajaxSupp
      at com.sun.facelets.el.LegacyValueBinding.isReadOnly(LegacyValueBinding.java:84)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:84)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:94)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:94)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:94)
      at org.apache.myfaces.shared_impl.util.RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(RestoreStateUtils.java:57)
      at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:96)
      at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)

      By the way, when I change the component's scope to SESSION everything works fine.

      Below is how the request is triggered from the client. An ajax4jsf request.

      <h:outputText id="urunAdiText" rendered="#{not girisHareket.active}" value="#{girisHareket.urun.urunAdi}">
      <a:support event="onclick" actionListener="#{ajaxSupport.onClick}" reRender="hareketPanel"/>
      </h:outputText>

      Any ideas what's going wrong?