PDA

View Full Version : There is one Spring Webflow's bugs and a problem (version of webflow 1.0EA)


langds
Apr 13th, 2006, 02:43 AM
Hello,
We are trying to use JSF+Spring Webflow 1.0EA into our OCRM project ,and our customer is a bank.
In our project and requirement,The OCRM System had to integrate with Portlet, We wish to do that as few as changes. so,I deploye my project package to WPS5.1 without any changes.and the JSF's vendor is SUN , the Faces Portlet vendor is IBM.
At the begining,with the portlet,it can work good basically.but,webflow in the portlet has some limits or problems:
In the portlet,when i click the Portlet's window control button of "Zoom", "Max" ,"Min"...,The portlet will re-render the JSF page and re-read the managed bean of flowScope from flowExecution instance via the JSF EL of start with "flowScope". but at current phase, spring webflow have bean removed the flowExecution refence from current context when JSF Lifycyle Phase arrived RENDER_RESONSE at the last client request,that lead the JSF EL Exception,The Exception stack is:

Nested Exception is javax.servlet.jsp.JspException: javax.faces.el.EvaluationException : 'flowScope' variable prefix specified, but a FlowExecution is not bound to current thread context as it should be
at com.sun.faces.taglib.html_basic.OutputTextTag.doEn dTag(OutputTextTag.java:177)
at org.apache.jsp._categoryForm._jspService(_category Form.java:144)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.se rvice(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$Jsp ServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.ser viceJspFile(JspServlet.java:683)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.ser vice (JspServlet.java:781)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInsta nce.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet._service (StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.s ervice(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet.service(StrictLifecycleServlet.java :116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.se rvice(ServletInstance.java:283)
I try to debug it, I found when portlet's window state changed,the current page in the portlet's would be re-rendered. but the client parameter of "_flowExecutionKey" could not be got in FacesContext,or anywhere.
So,I try to changed the FlowPhaseListener.updateFlowExecution(),I put "flowExecutionKey" to facesContext.getExternalContext().getSessionMap(), and removed the it from session when flow ended; and I changed FlowPhaseListener.prepareView() : when holder is null,tend to get flowExecutionKey from session.so ,this problem was resolved.
I gruess, this is a bug, I wish Spring team can resolve this problem.

Other,
There is a problem of LocalBeanInvokingAction,this action's invoke result was save to RequestScope, But at somewhere, I need save the result to flowScope,but I found that is no way to implement my thinking. this feature is very useful.so ,can you tell me some ideas?

Thanks. good luck.