1. javaserverfaces-spec-public

Support view actions that execute before tree is built w/ navigation support


    • Issuezilla Id:
    • Status Whiteboard:

      size_medium importance_large 20110201-tag

      size_medium importance_large 20110201-tag


      JSF should provide a view metadata component that defines a method expression to
      be invoked before the component tree is built (or restored), with support for
      navigating to an alternative view afterward using navigation rules. Navigation
      may be the result of a constraint violation, a security restriction, or because
      the request was for a pseudo-view.

      As an example, the developer might use a view action to load a blog entry before
      the view is displayed. If the entry cannot be found, the user would be
      redirected to another page using a navigation rule.

      <f:viewParam name="id" value="#


      <f:viewAction execute="#

      {blogController.loadEntry}" onPostback="false"/>



      This feature relates to view parameters, as the example suggests. View
      parameters were introduced in JSF 2.0 to provide a declarative value binding
      between query string parameters and model properties. They go a long way towards
      accommodating the action-oriented scenario in JSF. But view actions are a
      necessary part of the equation.

      <f:event type="preRenderView"> is similar to <f:viewAction>, but is insuffient
      as a front controller. <f:event> gets you by if the purpose is to perform
      processing at the start of the request. <f:viewAction> is intended for when you
      have to perform logic to verify that the view can even be rendered. View-level
      security is one example. Another is verifying that preconditions are met. And
      the key is to make navigation away from the view an integrated part when it's
      determined that the view cannot and should not be rendered.

        Issue Links


          Ed Burns logged work - 09/Jun/11 2:00 PM
          • Time Spent:
            3 hours, 37 minutes
            <No comment>
          Ed Burns logged work - 13/Jun/11 2:26 PM
          • Time Spent:
            1 hour, 30 minutes
            <No comment>
          Ed Burns logged work - 15/Jun/11 3:36 PM
          • Time Spent:
            4 hours, 37 minutes
            working on spec language
          Ed Burns logged work - 17/Jun/11 8:59 AM
          • Time Spent:
            30 minutes
            <No comment>
          Ed Burns logged work - 14/Dec/12 2:40 PM
          • Time Spent:
            20 minutes
            M jsf-ri/conf/share/facelets_jsf_core.tld

            - Add missing actionListener attribute.
            Sending jsf-ri/conf/share/facelets_jsf_core.tld
            Transmitting file data .
            Committed revision 11170.
          Ed Burns logged work - 31/Jan/13 5:54 AM
          • Time Spent:
            30 minutes
            SECTION: Modified Files
            M jsf-ri/src/main/java/com/sun/faces/lifecycle/
            M jsf-api/src/main/java/javax/faces/view/

            - Per discussion with Leonardo on EG, simplify lifecycle
              short-circuiting in the case of view metadata.

            M jsf-api/src/main/java/javax/faces/application/

            - Per discussion with Leonardo on EG, require that createViewResource()
              can load views in flows.
            Sending jsf-api/src/main/java/javax/faces/application/
            Sending jsf-api/src/main/java/javax/faces/view/
            Sending jsf-ri/src/main/java/com/sun/faces/lifecycle/
            Transmitting file data ...
            Committed revision 11511.


            • Assignee:
              Ed Burns
            • Votes:
              10 Vote for this issue
              4 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - Not Specified
                Not Specified
                Time Spent - 11 hours, 4 minutes Remaining Estimate - 1 week, 2 days, 23 hours, 10 minutes
                1w 2d 23h 10m
                Time Spent - 11 hours, 4 minutes Remaining Estimate - 1 week, 2 days, 23 hours, 10 minutes
                11h 4m