1. javaserverfaces-spec-public

The View Metadata tag is not processed unless at least one <f:viewParam> is defined


    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Lifecycle
    • Labels:
    • Environment:

      Operating System: Linux
      Platform: PC

    • Issuezilla Id:
    • Status Whiteboard:

      size_medium importance_medium

      size_medium importance_medium


      Section 2.2.1 of the JSF 2 spec requires that if no view-parameters exist in the
      view-metadata, that the render response phase be invoked immediately following
      the current phase on a GET request. This prevents custom metadata from being
      provided that may require lifecycle processing (view-actions, for example.)

      This is a hindrance to creating custom metadata-since even if a tool (such as
      prettyfaces) wishes to add custom url-parameter handling (or custom action
      invocation), it must also add an empty view-param in order to trigger the
      lifecycle. Also, not many people expect this behavior, since it is relatively

      I propose defining a new contract that would allow for individual meta-data
      components to determine whether or not the full lifecycle should be invoked:

      public interface ViewMetadata {

      • If true, the full faces lifecycle will be invoked; if false, the
      • lifecycle will skip directly to render-response, unless another
      • {@link ViewMetadata}

        object requests that the lifecycle be executed.
        public boolean requiresLifecycle();

      This new contract would still honor the behavior of previous implementations,
      and should be mostly backwards compatible (because unless the custom tag
      requests the lifecycle, it will still be skipped.)

      The current spec verbiage:

      2.2.1 - "If the request is not a postback, try to obtain the
      ViewDeclarationLanguage from the ViewHandler, for the current viewId. If no such
      instance can be obtained, call facesContext.renderResponse(). Otherwise, call
      getViewMetadata() on the ViewDeclarationLanguage instance. If the result is
      non-null, call createViewMetadata() on the ViewMetadata instance. Call
      ViewMetadata.getViewParameters(). If the result is a non-empty Collection, do
      not call facesContext.renderResponse(), otherwise do call
      facesContext.renderResponse(). If it turns out that the previous call to
      createViewMetadata() did not create a UIViewRoot instance, call createView() on
      the ViewHandler. Call renderResponse() on the FacesContext."


        lincolnbaxter created issue -
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 872 20477
        Ed Burns made changes -
        Assignee sheetalv [ sheetalv ] Ed Burns [ edburns ]
        Ed Burns made changes -
        Assignee Ed Burns [ edburns ]
        Ed Burns made changes -
        Fix Version/s 2.3 [ 16372 ]
        Fix Version/s 2.2 [ 10403 ]
        Ed Burns made changes -
        Priority Critical [ 2 ] Trivial [ 5 ]
        Fix Version/s 2.3 [ 16372 ]
        Ed Burns made changes -
        Priority Trivial [ 5 ] Minor [ 4 ]


          • Assignee:
          • Votes:
            5 Vote for this issue
            4 Start watching this issue


            • Created: