3 Replies Latest reply on Oct 16, 2007 6:46 AM by Michael Price

    Binding Component to Backing Bean Property

    Michael Price Newbie

      I tried to bind a component to a backing bean property

      <h:panelGrid id="panelGrid_01" binding="#{conceptManager.letterPanelGrid}"/>

      and ran into this problem.

      "You can't bind to a CONVERSATION scoped backing component because the conversation context is not available in the RESTORE VIEW phase."

      So I changed the scope to Session

      public class ConceptManagerAction implements ConceptManager, Serializable{

      and still had the same problem.

      java.lang.IllegalStateException: No conversation context active org.jboss.seam.ScopeType.getContext(ScopeType.java:126) org.jboss.seam.Component.outjectAttribute(Component.java:1665)
      com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93) com.sun.faces.lifecycle.RestoreViewPhase.doPerComponentActions(RestoreViewPhase.java:244)

      Is it possible that I could write a PhaseListener that runs before RestoreView and makes the necessary context avaiable so that resolving the binding expression during RestoreView will work? If not then would the closest alternative be creating a custom component that will create the kind of PanelGrid I would like to have?

      Thanks Mike Price