ICEfaces
  1. ICEfaces
  2. ICE-7237

MyFaces 2 Regression Test Failure: navigation does not work properly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.2
    • Fix Version/s: 3.0
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      MyFaces 2 ICEfaces 2 Nightly Regression Test
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Add FacesServlet mapping:


          <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.xhtml</url-pattern>
          </servlet-mapping>
      Show
      Add FacesServlet mapping:     <servlet-mapping>         <servlet-name>Faces Servlet</servlet-name>         <url-pattern>*.xhtml</url-pattern>     </servlet-mapping>

      Description

      The following nightly regressions show issues with navigation when running with MyFaces 2:

      ICE-4565
      ICE-2994
      ICE-2031

      Navigation either causes an error or the navigation attempts to navigate to a page with a different extension.

        Issue Links

          Activity

          Hide
          Deryk Sinotte added a comment -

          Linking to parent case.

          Show
          Deryk Sinotte added a comment - Linking to parent case.
          Hide
          Deryk Sinotte added a comment -

          Using the ICE-4565 regression test, it's clear to see that the value of the redirect upate returned by MyFaces uses the .xhtml extension:

          <?xml version="1.0" encoding="utf-8"?><partial-response><redirect url="/my/page.xhtml"></redirect></partial-response>

          rather than the .jsf extension that is declared in the navigation rule

          <navigation-case>
          <from-outcome>submit</from-outcome>
          <to-view-id>/page.jsf</to-view-id>
          <redirect/>
          </navigation-case>

          With Mojarra, the extension is preserved:

          <?xml version='1.0' encoding='UTF-8'?><partial-response><redirect url="/mo/page.jsf"></redirect></partial-response>

          Show
          Deryk Sinotte added a comment - Using the ICE-4565 regression test, it's clear to see that the value of the redirect upate returned by MyFaces uses the .xhtml extension: <?xml version="1.0" encoding="utf-8"?><partial-response><redirect url="/my/page.xhtml"></redirect></partial-response> rather than the .jsf extension that is declared in the navigation rule <navigation-case> <from-outcome>submit</from-outcome> <to-view-id>/page.jsf</to-view-id> <redirect/> </navigation-case> With Mojarra, the extension is preserved: <?xml version='1.0' encoding='UTF-8'?><partial-response><redirect url="/mo/page.jsf"></redirect></partial-response>
          Hide
          Deryk Sinotte added a comment -

          Other than the workaround, I can only presume that this is an MyFaces issue. I've logged a JIRA to that effect:

          https://issues.apache.org/jira/browse/MYFACES-3313

          Show
          Deryk Sinotte added a comment - Other than the workaround, I can only presume that this is an MyFaces issue. I've logged a JIRA to that effect: https://issues.apache.org/jira/browse/MYFACES-3313
          Hide
          Deryk Sinotte added a comment -

          I modified the following regression tests to add the extra mapping which allows them to work with MyFaces:

          [deryk] Nightly > svn commit ICE-4565/ ICE-2994/ -m "ICE-7237: add .xhtml mapping to tests so that navigation works with MyFaces"
          Sending ICE-2994/web/WEB-INF/web.xml
          Sending ICE-4565/web/WEB-INF/web.xml

          Test ICE-2031 turned out to look like a navigation problem but is not related to these other two cases.

          Resolving as Won't Fix as there are a number of ways to avoid this. If MyFaces doesn't change their approach, other options might be to:

          • add a custom NavigationHandler
          • provide custom ExternalContext and override the encodeRedirectURL() method
          • use .xhtml mapping for everything rather than the virtual .jsf extension
          Show
          Deryk Sinotte added a comment - I modified the following regression tests to add the extra mapping which allows them to work with MyFaces: [deryk] Nightly > svn commit ICE-4565 / ICE-2994 / -m " ICE-7237 : add .xhtml mapping to tests so that navigation works with MyFaces" Sending ICE-2994 /web/WEB-INF/web.xml Sending ICE-4565 /web/WEB-INF/web.xml Test ICE-2031 turned out to look like a navigation problem but is not related to these other two cases. Resolving as Won't Fix as there are a number of ways to avoid this. If MyFaces doesn't change their approach, other options might be to: add a custom NavigationHandler provide custom ExternalContext and override the encodeRedirectURL() method use .xhtml mapping for everything rather than the virtual .jsf extension

            People

            • Assignee:
              Deryk Sinotte
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: