Details

    • Type: New Feature New Feature
    • Status: Reopened
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.2 Sprint 8
    • Fix Version/s: None
    • Component/s: Components/Renderers
    • Labels:
      None
    • Status Whiteboard:
      Hide

      size_large importance_large

      Show
      size_large importance_large

      Description

      CA fairly common pattern in JSF is for container components to temporarily set up context that is available while processing children - eg. UIData sets up the "var" value before executing child lifecycle methods. In Trinidad and ADF Faces we have a variety of components that establish similar context.

      An issue with this is that there is no way to unwind/suspend this context in cases where it is necessary to interrupt processing in order to start over in a new context - eg. when invokeOnComponent() or visitTree() is called.

      Trinidad has solved this problem via its ComponentContextManager API. See:

      http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ComponentContextManager.java?view=markup

      This provides a common mechanism that components can use for pushing/popping/suspending their context and allows for new invokeOnComponent()/visitTree() calls to be initiated in a clean environment.

      In addition, Trinidad's UIXComponent provides a number of hooks to assist components with their context setup/teardown.

      One problem with Trinidad's solution is that it only applies to Trinidad-based components. Ideally this problem should be solved by the JSF specification in a generic manner so that all components can participate.

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Carry forward to 2.2 Sprint 9.

          Show
          Ed Burns added a comment - Carry forward to 2.2 Sprint 9.
          Hide
          Ed Burns added a comment -

          Andy, can you please verify my understanding? Have I got this right:

          You are not suggesting that we implement this API and, at the same time, modify
          invokeOnComponent() and visitTree() to automatically perform the spend/resume using
          the API?

          In other words:

          This proposal seeks to provide an API that components can use themselves when they need
          to be able to temporarily suspend their processing in order to correctly perform
          a invokeOnComponent() or visitTree() operation. There will be no occurrences of using
          this API in the standard components.

          Is that correct?

          Show
          Ed Burns added a comment - Andy, can you please verify my understanding? Have I got this right: You are not suggesting that we implement this API and, at the same time, modify invokeOnComponent() and visitTree() to automatically perform the spend/resume using the API? In other words: This proposal seeks to provide an API that components can use themselves when they need to be able to temporarily suspend their processing in order to correctly perform a invokeOnComponent() or visitTree() operation. There will be no occurrences of using this API in the standard components. Is that correct?
          Hide
          Ed Burns added a comment -

          First draft of API committed to trunk.

          Adding jsf-api/src/main/java/javax/faces/component/visit/ComponentModification.java
          Adding jsf-api/src/main/java/javax/faces/component/visit/ComponentModificationManager.java
          Sending jsf-api/src/main/java/javax/faces/context/FacesContext.java
          Sending jsf-api/src/main/java/javax/faces/context/FacesContextWrapper.java
          Sending jsf-ri/src/main/java/com/sun/faces/context/FacesContextImpl.java
          Transmitting file data .....
          Committed revision 9521.

          Show
          Ed Burns added a comment - First draft of API committed to trunk. Adding jsf-api/src/main/java/javax/faces/component/visit/ComponentModification.java Adding jsf-api/src/main/java/javax/faces/component/visit/ComponentModificationManager.java Sending jsf-api/src/main/java/javax/faces/context/FacesContext.java Sending jsf-api/src/main/java/javax/faces/context/FacesContextWrapper.java Sending jsf-ri/src/main/java/com/sun/faces/context/FacesContextImpl.java Transmitting file data ..... Committed revision 9521.
          Hide
          Ed Burns added a comment -

          Re-opening per Andy's request.

          Show
          Ed Burns added a comment - Re-opening per Andy's request.
          Hide
          Ed Burns added a comment -

          Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

          Show
          Ed Burns added a comment - Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

            People

            • Assignee:
              aschwart
              Reporter:
              aschwart
            • Votes:
              4 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m