Details
Description
When Seam jBPM does page navigation using redirects, there's a mismatch in Pageflow.validatePageflow(Seam code)
//now check that the restored view id matches what we expect
//from the pageflow node
//TODO: we need some way to disable this check, since users
// might want some adhoc nav in and out of a pageflow?
String viewId = Pages.getViewId(facesContext);
if ( !viewId.equals( getPage().getViewId() ) )
{
illegalNavigationError();
}
In my example, the viewId from the facesContext object is pageD.seam, whereas the viewId from getPage().getViewId() is pageD.xhtml. This mismatch causes illegalNavigationError to be called, which does page navigation to the current page (in my case) which causes the redirection loop.
We need to understand why the difference in page viewID representation.
//now check that the restored view id matches what we expect
//from the pageflow node
//TODO: we need some way to disable this check, since users
// might want some adhoc nav in and out of a pageflow?
String viewId = Pages.getViewId(facesContext);
if ( !viewId.equals( getPage().getViewId() ) )
{
illegalNavigationError();
}
In my example, the viewId from the facesContext object is pageD.seam, whereas the viewId from getPage().getViewId() is pageD.xhtml. This mismatch causes illegalNavigationError to be called, which does page navigation to the current page (in my case) which causes the redirection loop.
We need to understand why the difference in page viewID representation.
This has been fixed for some time. I had changed the D2DViewHandler to get rid of the mungeViewId method and moved the getRenderedViewId method from the D2DFaceletViewHandler into the D2DViewHandler superclass. This implementation did the right thing, and Mark's fix for 2871 did the right thing at the proper time so navigation rules can now be written with both the 'from' and 'to' viewId's being written with 'jspx' or 'xhtml' extensions, rather than one field being '.iface' and the other being 'xhtml', etc.