[ https://issues.apache.org/jira/browse/MYFACES-4178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306874#comment-16306874 ]
Paul Nicolucci commented on MYFACES-4178: ----------------------------------------- Looking at our NavigationHandlerImpl we have a check for : {code:java} if (navigationCase.isRedirect() || isViewActionProcessingBroadcastAndRequiresRedirect) {code} However I think the tricky thing to do here is to cleanly be able to check the current and new flow values. > Entering JSF Flow via ViewAction does not add required query params > ------------------------------------------------------------------- > > Key: MYFACES-4178 > URL: https://issues.apache.org/jira/browse/MYFACES-4178 > Project: MyFaces Core > Issue Type: Bug > Affects Versions: 2.3.0-beta > Reporter: Jay Sartoris > Priority: Minor > Attachments: JSF23ViewActionFlowEntry.war > > > In Spec Issue 1403: > https://github.com/javaee/javaserverfaces-spec/issues/1403 > It states that: > ----------- > Specifically, the > FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME and the > FlowHandler.FLOW_ID_REQUEST_PARAM_NAME must be added to the query string > when entering the flow in this way. > ----------- > In MyFaces 2.3 these parameters are not added to the query string when > entering the flow from the viewAction. They are added when using Mojarra JSF > 2.3. > I've also tested with the MyFaces 12/02/2017 snapshot and I still see the > same behavior. > * > The JSF 2.3 Spec says this: > Section 7.4.2 regarding the default navigation handler implementation* > {noformat} > If the <redirect/> element was specified in this <navigation-case>, or this > invocation of > handleNavigation() was due to a UIViewAction broadcast event where the new > viewId is different from > the current viewId, resolve the <to-view-id> to a view identifier, using the > algorithm in Section 7.4.2.1 > “Requirements for Explicit Navigation in Faces Flow Call Nodes other than > ViewNodes”. 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. If > this navigation is a flow transition (where current flow is not the same as > the new flow), include the relevant flow > metadata as entries in the parameters. > If current flow is not null and new flow is null, include the following > entries: > FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME: FlowHandler.NULL_FLOW > FlowHandler.FLOW_ID_REQUEST_PARAM_NAME: “” (the empty string) > If current flow is null and new flow is not null, include the following > entries: > FlowHandler.TO_FLOW_DOCUMENT_ID_REQUEST_PARAM_NAME: The to flow document id > FlowHandler.FLOW_ID_REQUEST_PARAM_NAME: the flow id for the flow that is the > destination of the > transition. > If the parameters map has entries for either of these keys, both of the > entries must be replaced with the new > values. This allows the call to FlowHandler.clientWindowTransition() to > perform correctly when > the GET request after the redirect happens. > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)