javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-762

Only short-circuit a non-faces request to render response if view metadata has no children

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.2
    • Component/s: Lifecycle
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      762
    • Status Whiteboard:
      Hide

      size_medium importance_medium

      Show
      size_medium importance_medium

      Description

      Currently, on an non-faces request, the Restore View short-circuits to the
      Render Response if the view metadata contains no UIViewParameter children. The
      exclusive check in this logic breaks the whole extensibility of the view
      metadata feature.

      Consider that a component author creates a custom component to be used in the
      view metadata. Now, the page author has to add add least one (perhaps arbitrary)
      UIViewParameter in the view metadata in order for view metadata to go through
      the full JSF lifecycle, and the custom component activated, on an initial
      request.

      Here is the correct logic for the Restore View phase:

      viewRoot = metadata.createMetadataView(facesContext);
      // Only skip to render response if there are no child components
      UIComponent metadataFacet = viewRoot.getFacet(UIViewRoot.METADATA_FACET_NAME);
      if (metadataFacet.getChildCount() == 0) {
      facesContext.renderResponse();
      }

      As a workaround, a component author could decorate the createMetadataView call
      and add a artificial UIViewParameter if other children are present (though
      setting it up would require a lot of work).

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Move to 2.1

          Show
          Ed Burns added a comment - Move to 2.1
          Hide
          Ed Burns added a comment -

          sheetalv

          Show
          Ed Burns added a comment - sheetalv
          Hide
          rogerk added a comment -

          triage

          Show
          rogerk added a comment - triage
          Hide
          Ed Burns added a comment -

          Bulk assign all of Sheetal's spec issues to me.

          Show
          Ed Burns added a comment - Bulk assign all of Sheetal's spec issues to me.
          Hide
          Ed Burns added a comment -

          Committed to trunk.

          Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/RestoreViewPhase.java
          Sending jsf-ri/systest/build-tests.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/build.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/pom.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun/faces
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun/faces/regression
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/Issue762PhaseListener.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/UserBean.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/webapp
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/webapp/WEB-INF
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/webapp/WEB-INF/faces-config.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/webapp/WEB-INF/web.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-762/i_spec_762_war/src/main/webapp/main.xhtml
          Sending jsf-test/build.xml
          Transmitting file data ..........
          Committed revision 9143.

          Show
          Ed Burns added a comment - Committed to trunk. Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/RestoreViewPhase.java Sending jsf-ri/systest/build-tests.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /build.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun/faces/regression Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/Issue762PhaseListener.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/java/com/sun/faces/regression/i_spec_762/UserBean.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/webapp Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/webapp/WEB-INF Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/webapp/WEB-INF/faces-config.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/webapp/WEB-INF/web.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-762 /i_spec_762_war/src/main/webapp/main.xhtml Sending jsf-test/build.xml Transmitting file data .......... Committed revision 9143.
          Hide
          Manfred Riem added a comment -

          Closing resolved issue out

          Show
          Manfred Riem added a comment - Closing resolved issue out

            People

            • Assignee:
              Ed Burns
              Reporter:
              mojavelinux
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Time Spent - 1 hour, 49 minutes Remaining Estimate - 22 hours, 11 minutes
                22h 11m
                Logged:
                Time Spent - 1 hour, 49 minutes Remaining Estimate - 22 hours, 11 minutes
                1h 49m