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

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

    Details

    • Issuezilla Id:
      758
    • Status Whiteboard:
      Hide

      size_medium importance_large 20110201-tag

      Show
      size_medium importance_large 20110201-tag

      Description

      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:view>
      <f:metadata>
      <f:viewParam name="id" value="#

      {blogController.id}

      "/>
      <f:viewAction execute="#

      {blogController.loadEntry}" onPostback="false"/>
      </f:metadata>
      </f:view>

      <navigation-case>
      <from-action>#{blogController.loadEntry}

      </from-action>
      <from-outcome>false</from-outcome>
      <to-view-id>/entries.xhtml</to-view-id>
      <redirect/>
      </navigation-case>

      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

          Activity

          mojavelinux created issue -
          kenaiadmin made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 758 20363
          Ed Burns made changes -
          Status Whiteboard size_medium importance_large size_medium importance_large 20110201-tag
          Ed Burns made changes -
          Assignee sheetalv [ sheetalv ] Ed Burns [ edburns ]
          Ed Burns made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Ed Burns made changes -
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.patch [ 46169 ]
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.zip [ 46170 ]
          Ed Burns made changes -
          Attachment changebundle.txt [ 46174 ]
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.zip [ 46170 ]
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.patch [ 46169 ]
          Ed Burns made changes -
          Attachment newfiles.zip [ 46175 ]
          Ed Burns made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 3 hours, 37 minutes [ 13020 ]
          Ed Burns made changes -
          Remaining Estimate 0 minutes [ 0 ] 1 day, 16 hours [ 144000 ]
          Ed Burns made changes -
          Remaining Estimate 1 day, 16 hours [ 144000 ] 1 day, 14 hours, 30 minutes [ 138600 ]
          Time Spent 3 hours, 37 minutes [ 13020 ] 5 hours, 7 minutes [ 18420 ]
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.zip [ 46221 ]
          Ed Burns made changes -
          Attachment 20110609_i_spec_758.zip [ 46221 ]
          Ed Burns made changes -
          Attachment i_spec_758_war.zip [ 46222 ]
          Ed Burns made changes -
          Attachment 20110615_i_spec_758.patch [ 46337 ]
          Ed Burns made changes -
          Remaining Estimate 1 day, 14 hours, 30 minutes [ 138600 ] 1 day, 9 hours, 53 minutes [ 121980 ]
          Time Spent 5 hours, 7 minutes [ 18420 ] 9 hours, 44 minutes [ 35040 ]
          Ed Burns made changes -
          Remaining Estimate 1 day, 9 hours, 53 minutes [ 121980 ] 1 day, 9 hours, 23 minutes [ 120180 ]
          Time Spent 9 hours, 44 minutes [ 35040 ] 10 hours, 14 minutes [ 36840 ]
          Ed Burns made changes -
          Remaining Estimate 1 day, 9 hours, 23 minutes [ 120180 ] 1 week, 3 days [ 864000 ]
          Ed Burns made changes -
          Attachment 20110729-01-i_spec_758.patch [ 46821 ]
          Ed Burns made changes -
          Attachment 20110810-i_spec_758.patch [ 46923 ]
          Ed Burns made changes -
          Attachment diffs.patch [ 46927 ]
          Ed Burns made changes -
          Attachment diffs.patch [ 46935 ]
          Ed Burns made changes -
          Attachment 20110812-i_spec_758.patch [ 46958 ]
          Ed Burns made changes -
          Link This issue depends on JAVASERVERFACES-2165 [ JAVASERVERFACES-2165 ]
          Ed Burns made changes -
          Attachment 20110818-i_spec_758.patch [ 47023 ]
          Ed Burns made changes -
          Flagged [Impediment]
          Ed Burns made changes -
          Flagged [Impediment]
          Ed Burns made changes -
          Link This issue depends on JAVASERVERFACES-2269 [ JAVASERVERFACES-2269 ]
          Ed Burns made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ed Burns made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ed Burns made changes -
          Remaining Estimate 1 week, 3 days [ 864000 ] 1 week, 2 days, 23 hours, 40 minutes [ 862800 ]
          Time Spent 10 hours, 14 minutes [ 36840 ] 10 hours, 34 minutes [ 38040 ]
          Ed Burns made changes -
          Remaining Estimate 1 week, 2 days, 23 hours, 40 minutes [ 862800 ] 1 week, 2 days, 23 hours, 10 minutes [ 861000 ]
          Time Spent 10 hours, 34 minutes [ 38040 ] 11 hours, 4 minutes [ 39840 ]
          Ed Burns made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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