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

          Ed Burns logged work - 07/Jun/11 7:05 PM
          • Time Spent:
            1 hour, 49 minutes
             
            Specified, implemented, and automated test authored. Now running full suite of tests.

            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