领先一步
VMware 提供培训和认证,助您快速进步。
了解更多Spring Web Flow 是 Spring 社区的一个产品,专注于协调 Web 应用程序中的用户界面流程。
此版本包含许多改进和几个令人兴奋的新功能。 我们认为它是迄今为止最稳定的版本,并且最终,此版本使 Spring Web Flow 1.0 最终路线图的功能已完成。 Spring Web Flow 1.0 最终版将在下周发布,改动最小。 从现在到那时,我们鼓励您测试 1.0 RC4,以便在 1.0 正式发布之前帮助发现任何剩余问题。
请注意,此版本中存在影响用户的更改。 1.0 RC3 或更早版本的用户应查阅 升级指南,其中详细概述了这些更改。
1.0 RC4 中的新增和重要特性列表令人兴奋,包括:
新增和重要特性
作为 Spring Web Flow 1.0 最终版之前的最后一个发布候选版本,Spring Web Flow 1.0 RC4 引入了强大的新功能,例如渲染操作 (1)、评估操作 (2)、设置操作 (3)、闪存范围 (4)、流程执行属性 (5) 和暂停时始终重定向 (6)。它提供了增强的文档、更好的流程定义验证、智能默认值以及用于配置流程执行引擎的完整自定义 Spring 2.0 配置模式 (7)。
<view-state id="displayResults" view="searchResults">
<render-actions>
<bean-action bean="phonebook" method="search">
<method-arguments>
<argument expression="flowScope.searchCriteria"/>
</method-arguments>
<method-result name="results"/>
</bean-action>
</render-actions>
<transition on="newSearch" to="enterCriteria"/>
<transition on="select" to="browseDetails"/>
</view-state>
<action-state id="makeGuess">
<evaluate-action expression="flowScope.game.makeGuess(requestParameters.guess)">
<evaluation-result name="guessResult"/>
</evaluate-action>
<transition on="CORRECT" to="showAnswer"/>
<transition on="*" to="enterGuess"/>
<transition on-exception="java.lang.NumberFormatException" to="enterGuess"/>
</action-state>
<action-state id="uploadFile">
<action bean="uploadAction" method="uploadFile"/>
<transition on="success" to="selectFile">
<set attribute="fileUploaded" scope="flash" value="true"/>
</transition>
</action-state>
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-1.0.xsd">
<start-state idref="selectFile"/>
<view-state id="selectFile" view="fileForm">
<transition on="submit" to="uploadFile"/>
</view-state>
<action-state id="uploadFile">
<action bean="uploadAction" method="uploadFile"/>
<transition on="success" to="selectFile">
<set attribute="fileUploaded" scope="flash" value="true"/>
</transition>
</action-state>
</flow>
<flow:executor id="flowExecutor" registry-ref="flowRegistry">
<flow:execution-attributes>
<flow:alwaysRedirectOnPause value="false"/>
</flow:execution-attributes>
</flow:executor>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd">
<!-- Launches new flow executions and resumes existing executions. -->
<flow:executor id="flowExecutor" registry-ref="flowRegistry"/>
<!-- Creates the registry of flow definitions for this application -->
<flow:registry id="flowRegistry">
<flow:location path="/WEB-INF/flows/**-flow.xml"/>
</flow:registry>
</beans>
有关这些功能的更多信息,请参阅参考手册。 Spring Web Flow 1.0 RC4 进一步完善了参考文档,提供了 70 页关于 SWF 使用的说明。 该手册可在线获取,格式为 HTML 和 PDF。
入门指南
学习 Spring Web Flow 的最佳方法之一是查看和演练示例应用程序。 我们建议从一开始就查看所有示例,并根据需要补充参考手册材料。该版本附带了十个示例应用程序,每个应用程序都演示了一组独特的产品功能。 这些示例是
要快速评估并构建示例应用程序,只需
所有示例项目都是 Spring IDE 项目,可以直接导入 Eclipse。
感谢所有支持此版本的朋友们。 Spring Web Flow 1.0 终于... 就在眼前了。
祝您使用愉快!
Spring Web Flow 团队