我创建了一个运行良好的 JSF 购物车应用程序。我正在使用“重定向”来解决刷新问题。问题是,当存在多个页面流逻辑时,例如,如果您尚未注册,则需要注册或创建帐户,一旦完成,您需要重定向回系统要求您注册时所在的位置首先。所以我的目标是使用 Web Flow 2 使导航规则更容易编码。我一直在单独研究它们,但我不知道如何合并以便 Web Flow 可以处理导航。
非常感谢任何帮助。
谢谢。
I created a JSF cart application which runs just fine. I am using 'redirect' to fix the problem with refresh. The problem is when there is multiple page flow logic like if you haven't signed up you need to sign up or create an account, and once you do that you need to be redirected back to where you were when you were asked to sign up in the first place. So my goal is to use Web Flow 2 in order to make navigation rules easier to code. I have been working on them separately but I don't know how to merge so that Web Flow can handle navigation instead.
Any help is very much appreciated.
Thanks.
发布评论
评论(2)
您可以使用视图状态来做到这一点:
您将 someAction 定义为
并且在转换内部执行诸如保存在数据库中、验证之类的逻辑。
您可以查看 http://www.springfuse.com/ 中的人员。
生成 JSF(Primefaces)+Webflow +... 项目后,您将能够学到更多内容。
You do that using view states:
You define someAction as a
<h:commandbutton action="someAction" ...
And inside transitions you perform logic like saving in the database, validating, whatever.
You can check out the guys from http://www.springfuse.com/.
After you generate a JSF(Primefaces)+Webflow +... project you`ll be able to learn alot more.
这个网站非常有用:
http:// www.springbyexample.org/examples/simple-spring-web-flow-webapp-spring-config.html
您还可以参考spring web flow资源并寻找JSF集成,但这不是很清楚。
This site is very useful:
http://www.springbyexample.org/examples/simple-spring-web-flow-webapp-spring-config.html
You can also refer to spring web flow resources and look for JSF integration, but that is not very clear.