You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applications using JSF 2.2 Faces Flows and MyFaces don't work with PrettyFaces. This NPE is thrown:
java.lang.NullPointerException
at org.apache.myfaces.application.NavigationHandlerImpl.getNavigationCaseFromFlowStructure(NavigationHandlerImpl.java:905)
at org.apache.myfaces.application.NavigationHandlerImpl.getNavigationCommand(NavigationHandlerImpl.java:720)
at org.apache.myfaces.application.NavigationHandlerImpl.getNavigationCase(NavigationHandlerImpl.java:394)
at com.ocpsoft.pretty.faces2.application.PrettyNavigationHandler.getNavigationCase(PrettyNavigationHandler.java:121)
at org.ocpsoft.rewrite.faces.RewriteNavigationHandler.getNavigationCase(RewriteNavigationHandler.java:116)
at org.apache.myfaces.shared.renderkit.html.util.OutcomeTargetUtils.getOutcomeTargetHref(OutcomeTargetUtils.java:81)
at org.apache.myfaces.shared.renderkit.html.HtmlRendererUtils.getOutcomeTargetHref(HtmlRendererUtils.java:1602)
at org.apache.myfaces.shared.renderkit.html.HtmlLinkRendererBase.renderOutcomeLinkStart(HtmlLinkRendererBase.java:1006)
at org.apache.myfaces.shared.renderkit.html.HtmlLinkRendererBase.encodeBegin(HtmlLinkRendererBase.java:145)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:597)
at javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:527)
It looks to me like PrettyFaces doesn't correctly register Flows in its PrettyNavigationHandler. PrettyNavigationHandler extends ConfigurableNavigationHandler, however it doesn't do anything with the inspectFlow method that was added in JSF 2.2. To resolve this, PrettyNavigationHandler should probably override inspectFlow and delegate to its parent, since the default implementation of inspectFlow is a no-op.
Applications using JSF 2.2 Faces Flows and MyFaces don't work with PrettyFaces. This NPE is thrown:
It looks to me like PrettyFaces doesn't correctly register Flows in its
PrettyNavigationHandler
.PrettyNavigationHandler
extendsConfigurableNavigationHandler
, however it doesn't do anything with theinspectFlow
method that was added in JSF 2.2. To resolve this,PrettyNavigationHandler
should probably overrideinspectFlow
and delegate to its parent, since the default implementation ofinspectFlow
is a no-op.I've created a sample branch that reproduces this issue: https://github.com/wtlucy/jsf22-examples/tree/prettyfaces_issue/jsf22-flows
The text was updated successfully, but these errors were encountered: