javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-3205

Postback executes <f:event type="preRenderView"> listeners of another view when current view contains h:link which uses includeViewParams

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.25, 2.1.28, 2.2.5
    • Fix Version/s: 2.2.7
    • Labels:
      None
    • Environment:

      Windows 7 64-bit, Jetty

      Description

      When creating a link with an outcome that resolves to a page and using the includeViewParams, the preRenderView event of the target page will be attached to the current viewroot during the first render phase.
      On any postback of the first page, the preRenderView listener of the target page will be executed on the preRenderView event trigger of the first page. Even if the postback has nothing to do with the target page.
      In our case, the preRenderView event is used to check if the viewParams have a correct value, and an exception is thrown on any postback of the first page.

      See also https://java.net/jira/browse/JAVASERVERFACES-2158

      Attached is an example of 2 pages with 2 beans showing the issue. The first.xhtml page contains a bit of an explanation of how the problem is triggered.
      I conducted extra tests against the most recent versions of JSF 2.1 and 2.2

      It doesn't matter if you use an outcome defined in a NavigationCase in faces-config or just the name of the target view as outcome.

        Issue Links

          Activity

          Ben.Winkeler created issue -
          Manfred Riem made changes -
          Field Original Value New Value
          Assignee Manfred Riem [ mriem ]
          Manfred Riem made changes -
          Attachment jsf.bug.outcome.zip [ 53267 ]
          Manfred Riem made changes -
          Comment [ Sorry it looks like the attachment is not there. Can you send it again? Thanks! ]
          Ed Burns made changes -
          Assignee Manfred Riem [ mriem ] Ed Burns [ edburns ]
          Ed Burns made changes -
          Ed Burns made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Ed Burns made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 1 hour, 15 minutes [ 4500 ]
          Ed Burns made changes -
          Time Spent 1 hour, 15 minutes [ 4500 ] 1 hour, 30 minutes [ 5400 ]
          Ed Burns made changes -
          Status In Progress [ 3 ] Open [ 1 ]
          Ed Burns made changes -
          Time Spent 1 hour, 30 minutes [ 5400 ] 1 hour, 36 minutes [ 5760 ]
          Ed Burns made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Ed Burns made changes -
          Time Spent 1 hour, 36 minutes [ 5760 ] 3 hours, 6 minutes [ 11160 ]
          Ed Burns made changes -
          Ed Burns made changes -
          Time Spent 3 hours, 6 minutes [ 11160 ] 5 hours, 1 minute [ 18060 ]
          Ed Burns made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 2.2.7 [ 16868 ]
          Resolution Fixed [ 1 ]
          Manfred Riem made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ed Burns
              Reporter:
              Ben.Winkeler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 1 minute
                5h 1m