[
https://issues.jboss.org/browse/JBSEAM-4944?page=com.atlassian.jira.plugi...
]
Andrea Martino commented on JBSEAM-4944:
----------------------------------------
Hi all,
I investigated again this issue, and it happens with some JSF pages only, not with all of
them. I created a very minimal page as following and everything works fine:
{code}
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:s="http://jboss.com/products/seam/taglib"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>First</title>
</h:head>
<h:body>
<h:form>
<h:inputText id="name" value="#{customerSearch.name}"
/>
<h:commandButton value="Search"
action="#{customerSearch.search}" />
</h:form>
</h:body>
</html>
{code}
Somehow my JSF page which is much more complex breaks the navigation, while it worked fine
with Seam 2.2.0.GA + JBOSS 4.2.3.SP1 + RichFaces 3.3.3.
I'll check on my side and post exactly which part of my JSF page break the
navigation.
JPDL Pageflow broken in JSF2
----------------------------
Key: JBSEAM-4944
URL:
https://issues.jboss.org/browse/JBSEAM-4944
Project: Seam 2
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.3.0.BETA1
Environment: JBOSS 7.1 + JSF2 + RichFaces 4.2.0.Final
Reporter: Andrea Martino
Labels: navigation, pageflow
The pageflow navigation is broken in Seam 2.3.0.Beta1 when using JSF2.0.
I defined a pageflow as following:
{code:xml|title=pageflow.jpdl.xml}
<?xml version="1.0" encoding="UTF-8"?>
<pageflow-definition name="captureorder">
<start-state>
<transition name="customersearch"
to="customersearch"/>
</start-state>
<page name="customersearch"
view-id="/customersearch.xhtml">
<transition name="customeroverview" to="customeroverview"
/>
</page>
<page name="customeroverview"
view-id="/customeroverview.xhtml" />
</pageflow-definition>
{code}
The page customersearch.xhtml calls a method in the controller that returns
"customeroverview" as following:
{code:xml:title=customersearch.xhtml}
<h:form>
<h:inputText id="name" value="#{customerSearch.name}" />
<h:commandButton value="Search"
action="#{customerSearch.search}" />
</h:form>
{code}
The browser is never redirected to the "customeroverview" page.
Somehow the class *org.jboss.seam.jsf.SeamNavigationHandler* in method *handleNavigation*
calls baseNavigationHandler (the last method) instead of Pageflow.instance().navigate
(which would be correct in this case)
{code:title=org.jboss.seam.jsf.SeamNavigationHandler}
@Override
public void handleNavigation(FacesContext context, String fromAction, String outcome)
{
if ( !context.getResponseComplete() ) //workaround for a bug in MyFaces
{
if ( isOutcomeViewId(outcome) )
{
FacesManager.instance().interpolateAndRedirect(outcome);
}
else if ( Init.instance().isJbpmInstalled() &&
Pageflow.instance().isInProcess() && Pageflow.instance().hasTransition(outcome) )
{
Pageflow.instance().navigate(context, outcome);
}
else if ( !Pages.instance().navigate(context, fromAction, outcome) )
{
baseNavigationHandler.handleNavigation(context, fromAction, outcome);
}
}
}
{code}
The reason for this behavior, is that *Pageflow.instance().isInProcess()* returns false,
even if the page with the form was reached inside a pageflow.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira