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

          Hide
          mojavelinux added a comment -

          Change target milestone.

          Show
          mojavelinux added a comment - Change target milestone.
          Hide
          mojavelinux added a comment -

          Andy Schwartz clarifies:

          1. View actions would be processed during invoke application phase.
          PreRenderView events are delivered during the render response phase.

          2. View actions would be integrated with the navigation system (allow navigation
          rules to be applied). PreRenderView events require programmatic interaction with
          the NavigationHandler.

          3. View actions would be part of the view metadata (like view parameters) and
          thus would be available before the full component tree has been created.
          PreRenderView event listeners are registered (via <f:event>) when the full
          component tree is created.

          Show
          mojavelinux added a comment - Andy Schwartz clarifies: 1. View actions would be processed during invoke application phase. PreRenderView events are delivered during the render response phase. 2. View actions would be integrated with the navigation system (allow navigation rules to be applied). PreRenderView events require programmatic interaction with the NavigationHandler. 3. View actions would be part of the view metadata (like view parameters) and thus would be available before the full component tree has been created. PreRenderView event listeners are registered (via <f:event>) when the full component tree is created.
          Hide
          Ed Burns added a comment -

          sheetalv

          Show
          Ed Burns added a comment - sheetalv
          Hide
          Ed Burns added a comment - - edited
          Show
          Ed Burns added a comment - - edited Lincoln also shared http://docs.jboss.org/seam/3/faces/reference/snapshot/en-US/html_single/#viewaction
          Hide
          Jan-Kees van Andel added a comment -
              • Issue 867 has been marked as a duplicate of this issue. ***
          Show
          Jan-Kees van Andel added a comment - Issue 867 has been marked as a duplicate of this issue. ***
          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 -

          Move viewParameters automated test to jsf-test

          Show
          Ed Burns added a comment - Move viewParameters automated test to jsf-test
          Hide
          Ed Burns added a comment -

          In progress.

          Show
          Ed Burns added a comment - In progress.
          Hide
          Ed Burns added a comment -

          Brian, if you could please hack upon this and make it a simple sample of s:viewAction, I'd really appreciate it.

          Show
          Ed Burns added a comment - Brian, if you could please hack upon this and make it a simple sample of s:viewAction, I'd really appreciate it.
          Hide
          Ed Burns added a comment -

          Brian, if you could please simply hack upon this and turn it into a simple example of s:viewAction, that would be great.

          Show
          Ed Burns added a comment - Brian, if you could please simply hack upon this and turn it into a simple example of s:viewAction, that would be great.
          Hide
          Ed Burns added a comment -

          Sending jsf-api/build.xml
          Adding jsf-api/doc/expert-draft-bg.graffle
          Adding jsf-api/doc/expert-draft-bg.png
          Adding jsf-api/doc/jsdoc-template
          Adding jsf-api/doc/jsdoc-template/static
          Adding jsf-api/doc/jsdoc-template/static/default.css
          Sending jsf-api/doc/standard-html-renderkit-base.xml
          Sending jsf-api/doc/standard-html-renderkit.xml
          Adding jsf-api/doc/uiviewaction-props.xml
          Adding jsf-api/src/main/java/javax/faces/component/UIViewAction.java
          Sending jsf-api/src/main/java/javax/faces/context/ExternalContextWrapper.java
          Sending jsf-api/src/main/java/javax/faces/event/PhaseId.java
          Sending jsf-api/src/main/resources/jsf-api.css
          Sending jsf-demo/build.xml
          Sending jsf-ri/build.xml
          Sending jsf-ri/conf/share/facelets_jsf_core.taglib.xml
          Sending jsf-ri/conf/share/facelets_jsf_core.tld
          Sending jsf-ri/conf/share/tlddoc-resources/stylesheet.css
          Sending jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/ComponentSupport.java
          Sending jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/core/CoreLibrary.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/build.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/pom.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758TestCase.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/pom.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsIndex.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsStory.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/WEB-INF
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/WEB-INF/faces-config.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/WEB-INF/web.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/events.xhtml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/page01.xhtml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/page02.xhtml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/page03.xhtml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/template.xhtml
          Sending jsf-test/build.xml
          Sending jsf-tools/src/main/resources/com/sun/faces/generate/facesdoc/stylesheet.css
          Transmitting file data ................................
          Committed revision 9173.

          Checkpoint. Specified but not implemented.

          Show
          Ed Burns added a comment - Sending jsf-api/build.xml Adding jsf-api/doc/expert-draft-bg.graffle Adding jsf-api/doc/expert-draft-bg.png Adding jsf-api/doc/jsdoc-template Adding jsf-api/doc/jsdoc-template/static Adding jsf-api/doc/jsdoc-template/static/default.css Sending jsf-api/doc/standard-html-renderkit-base.xml Sending jsf-api/doc/standard-html-renderkit.xml Adding jsf-api/doc/uiviewaction-props.xml Adding jsf-api/src/main/java/javax/faces/component/UIViewAction.java Sending jsf-api/src/main/java/javax/faces/context/ExternalContextWrapper.java Sending jsf-api/src/main/java/javax/faces/event/PhaseId.java Sending jsf-api/src/main/resources/jsf-api.css Sending jsf-demo/build.xml Sending jsf-ri/build.xml Sending jsf-ri/conf/share/facelets_jsf_core.taglib.xml Sending jsf-ri/conf/share/facelets_jsf_core.tld Sending jsf-ri/conf/share/tlddoc-resources/stylesheet.css Sending jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/ComponentSupport.java Sending jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/core/CoreLibrary.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /build.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758TestCase.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758 Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsIndex.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsStory.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/WEB-INF Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/WEB-INF/faces-config.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/WEB-INF/web.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/events.xhtml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/page01.xhtml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/page02.xhtml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/page03.xhtml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/template.xhtml Sending jsf-test/build.xml Sending jsf-tools/src/main/resources/com/sun/faces/generate/facesdoc/stylesheet.css Transmitting file data ................................ Committed revision 9173. Checkpoint. Specified but not implemented.
          Hide
          Ed Burns added a comment -

          snapshot. Brian Leathem's simple testcase works.

          Show
          Ed Burns added a comment - snapshot. Brian Leathem's simple testcase works.
          Hide
          Ed Burns added a comment -

          Snapshot, sample app based on Dan Allen's original NewsReader testcase works.

          Show
          Ed Burns added a comment - Snapshot, sample app based on Dan Allen's original NewsReader testcase works.
          Hide
          Ed Burns added a comment -

          Snapshot to run automated tests on ADC machine.

          Show
          Ed Burns added a comment - Snapshot to run automated tests on ADC machine.
          Hide
          Ed Burns added a comment -

          The i_spec_915 testcase caught a mod in this changebundle that introduced breakage. The jsf-ri-config.xml does not need to be modified and I'm not sure why it was. Victory for automated tests.

          Show
          Ed Burns added a comment - The i_spec_915 testcase caught a mod in this changebundle that introduced breakage. The jsf-ri-config.xml does not need to be modified and I'm not sure why it was. Victory for automated tests.
          Hide
          Ed Burns added a comment -

          Resolution attempt one realized http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-758

          SECTION: Modified Files
          ----------------------------
          M applicationIntegration.fm

          • 7.4.2 Rewrite the paragraph on how to handle a redirect as follows.

          If a matching <navigation-case> element was located, and the
          <redirect/> element was specified in this <navigation-case>

          + or a call to UIViewAction.isProcessingBroadcast() returns true,

          call getRedirectURL() on the ViewHandler, passing the current
          FacesContext, the <to-view-id>, any name=value parameter pairs
          specified within <view-param> elements within the <redirect> element,
          and the value of the include-view-params attribute of the <redirect />
          element if present, false, if not. The return from this method is the
          value to be sent to the client to which the redirect will occurr. Call
          getFlash().setRedirect(true) on the current FacesContext. Cause the
          current response to perform an HTTP redirect to this path.

          + If the preceding call to UIViewAction.isProcessingBroadcast() had
          + returned true, also call setKeepMessages(true) on the flash.

          Call responseComplete() on the FacesContext instance for the current
          request. If the content of <to-view-id> is a value expression, first
          evaluate it to obtain the value of the view id.

          M jsf-api/src/main/java/javax/faces/component/UIViewAction.java

          • complete spec for this feature
          • rename "if" attribute of f:viewAction to "rendered".

          M jsf-ri/conf/share/facelets_jsf_core.tld

          • rename "if" attribute of f:viewAction to "rendered".

          M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java

          • implement changes to 7.4.2

          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/build.xml
          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java
          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/page02.xhtml

          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/main.xhtml
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/WEB-INF
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/WEB-INF/web.xml
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/result.xhtml
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/pom.xml
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java

          Show
          Ed Burns added a comment - Resolution attempt one realized http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-758 SECTION: Modified Files ---------------------------- M applicationIntegration.fm 7.4.2 Rewrite the paragraph on how to handle a redirect as follows. If a matching <navigation-case> element was located, and the <redirect/> element was specified in this <navigation-case> + or a call to UIViewAction.isProcessingBroadcast() returns true, call getRedirectURL() on the ViewHandler, passing the current FacesContext, the <to-view-id>, any name=value parameter pairs specified within <view-param> elements within the <redirect> element, and the value of the include-view-params attribute of the <redirect /> element if present, false, if not. The return from this method is the value to be sent to the client to which the redirect will occurr. Call getFlash().setRedirect(true) on the current FacesContext. Cause the current response to perform an HTTP redirect to this path. + If the preceding call to UIViewAction.isProcessingBroadcast() had + returned true, also call setKeepMessages(true) on the flash. Call responseComplete() on the FacesContext instance for the current request. If the content of <to-view-id> is a value expression, first evaluate it to obtain the value of the view id. M jsf-api/src/main/java/javax/faces/component/UIViewAction.java complete spec for this feature rename "if" attribute of f:viewAction to "rendered". M jsf-ri/conf/share/facelets_jsf_core.tld rename "if" attribute of f:viewAction to "rendered". M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java implement changes to 7.4.2 M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /build.xml M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/page02.xhtml A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/main.xhtml A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/WEB-INF A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/WEB-INF/web.xml A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/result.xhtml A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/pom.xml A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java
          Hide
          Ed Burns added a comment -

          Sending jsf-api/src/main/java/javax/faces/component/UIViewAction.java
          Sending jsf-ri/conf/share/facelets_jsf_core.tld
          Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java
          Sending jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/build.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/pom.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/WEB-INF
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/WEB-INF/web.xml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/main.xhtml
          Adding jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/result.xhtml
          Sending jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java
          Sending jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_war/src/main/webapp/page02.xhtml
          Transmitting file data ............
          Committed revision 9254.

          Sending applicationIntegration.fm
          Sending preface.fm
          Transmitting file data ..
          Committed revision 1027.

          Committed to trunk.

          Show
          Ed Burns added a comment - Sending jsf-api/src/main/java/javax/faces/component/UIViewAction.java Sending jsf-ri/conf/share/facelets_jsf_core.tld Sending jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java Sending jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /build.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/pom.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/WEB-INF Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/WEB-INF/web.xml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/main.xhtml Adding jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/result.xhtml Sending jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/java/com/sun/faces/regression/i_spec_758/NewsReader.java Sending jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_war/src/main/webapp/page02.xhtml Transmitting file data ............ Committed revision 9254. Sending applicationIntegration.fm Sending preface.fm Transmitting file data .. Committed revision 1027. Committed to trunk.
          Hide
          Ed Burns added a comment -

          snapshot

          Show
          Ed Burns added a comment - snapshot
          Hide
          Ed Burns added a comment -

          Corner cases on using viewAction to go back to the same page http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-758

          SECTION: Modified Files
          ----------------------------
          M applicationIntegration.fm

          • 7.4.2 now has this text

          If a matching <navigation-case> element was located, proceed as follows.

          + * If UIViewAction.isProcessingBroadcast() returns true, call
          + getFlash().setKeepMessages(true) on the current FacesContext. Compare
          + the viewId of the current viewRoot with the <to-view-id> of the
          + matching <navigation-case>. If they differ, take any necessary actions
          + to effectively restart the JSF lifecycle on the<to-view-id> of the
          + matching <navigation-case>. Care must be taken to preserve any view
          + parameters or navigation case parameters, clear the view map of the
          + UIViewRoot, and call setRenderAll(true) on the
          + PartialViewContext. Implementations may choose to meet this
          + requirement by treating this case as if a <redirect /> was specified
          + on the matching <navigation-case>. If the viewIds do not differ,
          + continue on to the next bullet point.

          + * If the <redirect/> element was not specified in this <navigation-case>
          (or the application is running in a Portlet environment, where
          redirects are not possible), use the <to-view-id> element of the
          matching case to request a new UIViewRoot instance from the
          ViewHandler instance for this application, and pass it to the
          setViewRoot() method of the FacesContext instance for the current
          request. Then, exit the algorithm. If the content of <to-view-id> is a
          value expression, first evaluate it to obtain the value of the view
          id.

          + * If the <redirect/> element was specified in this <navigation-case>,
          call getRedirectURL() on the ViewHandler, passing the current
          FacesContext, the <to-view-id>, any name=value parameter pairs
          specified within <view-param> elements within the <redirect> element,
          and the value of the include-view-params attribute of the <redirect />
          element if present, false, if not. The return from this method is the
          value to be sent to the client to which the redirect will occurr. Call
          getFlash().setRedirect(true) on the current FacesContext. Cause the
          current response to perform an HTTP redirect to this path, and call
          responseComplete() on the FacesContext instance for the current
          request. If the content of <to-view-id> is a value expression, first
          evaluate it to obtain the value of the view id.

          M jsf-api/src/main/java/javax/faces/component/UIViewAction.java

          • Fix logic error that would cause multiple f:actionEvents to fail.

          M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java

          • Implement new 7.4.2 spec

          M jsf-test/build.xml

          • wire up testcases

          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/pageAviewActionPageA.xhtml
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/pageAviewActionEmpty.xhtml
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/pageAviewActionPageAExplicitRedirect.xhtml
          A jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/WEB-INF/faces-config.xml
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_simple_war/src/main/webapp/pageAviewActionNull.xhtml
          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java
          D jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758TestCase.java
          A + jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/ViewParametersTestCase.java
          M jsf-test/JAVASERVERFACES_SPEC_PUBLIC-758/build.xml

          • Exercise corner cases, also HtmlUnit test for ViewParameters
          Show
          Ed Burns added a comment - Corner cases on using viewAction to go back to the same page http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-758 SECTION: Modified Files ---------------------------- M applicationIntegration.fm 7.4.2 now has this text If a matching <navigation-case> element was located, proceed as follows. + * If UIViewAction.isProcessingBroadcast() returns true, call + getFlash().setKeepMessages(true) on the current FacesContext. Compare + the viewId of the current viewRoot with the <to-view-id> of the + matching <navigation-case>. If they differ, take any necessary actions + to effectively restart the JSF lifecycle on the<to-view-id> of the + matching <navigation-case>. Care must be taken to preserve any view + parameters or navigation case parameters, clear the view map of the + UIViewRoot, and call setRenderAll(true) on the + PartialViewContext. Implementations may choose to meet this + requirement by treating this case as if a <redirect /> was specified + on the matching <navigation-case>. If the viewIds do not differ, + continue on to the next bullet point. + * If the <redirect/> element was not specified in this <navigation-case> (or the application is running in a Portlet environment, where redirects are not possible), use the <to-view-id> element of the matching case to request a new UIViewRoot instance from the ViewHandler instance for this application, and pass it to the setViewRoot() method of the FacesContext instance for the current request. Then, exit the algorithm. If the content of <to-view-id> is a value expression, first evaluate it to obtain the value of the view id. + * If the <redirect/> element was specified in this <navigation-case>, call getRedirectURL() on the ViewHandler, passing the current FacesContext, the <to-view-id>, any name=value parameter pairs specified within <view-param> elements within the <redirect> element, and the value of the include-view-params attribute of the <redirect /> element if present, false, if not. The return from this method is the value to be sent to the client to which the redirect will occurr. Call getFlash().setRedirect(true) on the current FacesContext. Cause the current response to perform an HTTP redirect to this path, and call responseComplete() on the FacesContext instance for the current request. If the content of <to-view-id> is a value expression, first evaluate it to obtain the value of the view id. M jsf-api/src/main/java/javax/faces/component/UIViewAction.java Fix logic error that would cause multiple f:actionEvents to fail. M jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java Implement new 7.4.2 spec M jsf-test/build.xml wire up testcases M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/java/com/sun/faces/regression/i_spec_758_simple_war/ViewActionTestBean.java A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/pageAviewActionPageA.xhtml A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/pageAviewActionEmpty.xhtml A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/pageAviewActionPageAExplicitRedirect.xhtml A jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/WEB-INF/faces-config.xml A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_simple_war/src/main/webapp/pageAviewActionNull.xhtml M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758SimpleTestCase.java D jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/Issue758TestCase.java A + jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /i_spec_758_htmlunit/src/main/java/com/sun/faces/regression/i_spec_758/ViewParametersTestCase.java M jsf-test/ JAVASERVERFACES_SPEC_PUBLIC-758 /build.xml Exercise corner cases, also HtmlUnit test for ViewParameters
          Hide
          Ed Burns added a comment -

          Committed frame changes.

          Sending applicationIntegration.fm
          Transmitting file data .
          Committed revision 1028.
          Rhombus:frame edburns$

          Show
          Ed Burns added a comment - Committed frame changes. Sending applicationIntegration.fm Transmitting file data . Committed revision 1028. Rhombus:frame edburns$
          Hide
          lamine_ba added a comment -

          Hi,

          Regarding the instruction below

          
          <f:view>
          <f:metadata>
          
          <f:viewParam name="id" value="#{blogController.id}"/>
          <f:viewAction execute="#{blogController.loadEntry}" onPostback="false"/>
          
          </f:metadata>
          </f:view>
          
          

          I'm wondering if we could have this short variation

          
          <f:view>
          <f:metadata>
          
          <f:viewAction param-name="id" param-value="#{blogController.id}" 
          execute="#{blogController.loadEntry}" onPostback="false"/>
          
          </f:metadata>
          </f:view>
          
          

          Thanks

          Show
          lamine_ba added a comment - Hi, Regarding the instruction below <f:view> <f:metadata> <f:viewParam name= "id" value= "#{blogController.id}" /> <f:viewAction execute= "#{blogController.loadEntry}" onPostback= " false " /> </f:metadata> </f:view> I'm wondering if we could have this short variation <f:view> <f:metadata> <f:viewAction param-name= "id" param-value= "#{blogController.id}" execute= "#{blogController.loadEntry}" onPostback= " false " /> </f:metadata> </f:view> Thanks
          Hide
          Ed Burns added a comment -

          Closed pending verification of implementation.

          Show
          Ed Burns added a comment - Closed pending verification of implementation.
          Hide
          Ed Burns added a comment -

          Leo found some additional work for this issue.

          Show
          Ed Burns added a comment - Leo found some additional work for this issue.
          Hide
          arjan tijms added a comment -

          Now that the JSF 2.2 spec has been finalized, shouldn't this issue be closed as well?

          Show
          arjan tijms added a comment - Now that the JSF 2.2 spec has been finalized, shouldn't this issue be closed as well?

            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