polish
This commit is contained in:
@@ -2,6 +2,22 @@ SPRING WEB FLOW CHANGELOG
|
||||
=========================
|
||||
http://www.springframework.org/webflow
|
||||
|
||||
Changes in version 2.0.5 (11.11.2008)
|
||||
-------------------------------------
|
||||
Bug Fixes
|
||||
* Fixed compatibility issue introduced in Web Flow 2.0.4 with previous 2.0.x versions related to request -> flow id mapping.
|
||||
The existing FlowController now applies the previous behavior of "filename-based" request-> flow mapping (see FilenameFlowUrlHandler); for example /hotels/booking URL -> "booking" flow.
|
||||
The new FlowHandlerAdapter used in conjunction with FlowHandlerMapping now applies the new "path-based" request -> flow mapping (see DefaultFlowUrlHandler) ; for example /hotels/booking URL -> "hotels/booking" flow.
|
||||
Use of FlowHandlerAdapter with FlowHandlerMapping and the default path-based mapping (DefaultFlowUrlHandler) is recommended (SWF-939).
|
||||
* Fixed bug introduced in 2.0.4 that broke rendering of multiple fragments with Tiles (SWF-941).
|
||||
* Render 'fragments' request parameter values are now trimmed consistent with the Web Flow render fragments parameter (SWF-947).
|
||||
* Fixed bug where POJO action methods returning an empty string resulted in an IllegalArgumentException being thrown (SWF-739).
|
||||
* Fixed bug where base-path required a trailing slash in conjunction with flow-location entries (SWF-948).
|
||||
|
||||
Improvements
|
||||
* Added additional console logging to help debug Spring JavaScript decoration behaviors (SWF-937).
|
||||
* Improved documentation in the area of flow exception handling and security (SWF-922, SWF-944)
|
||||
|
||||
Changes in version 2.0.4 (04.11.2008)
|
||||
-------------------------------------
|
||||
New Features
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SPRING WEB FLOW 2.0.4 (November 2008)
|
||||
SPRING WEB FLOW 2.0.5 (November 2008)
|
||||
----------------------------------
|
||||
http://www.springframework.org/webflow
|
||||
|
||||
@@ -49,21 +49,21 @@ The following jar files are included in the distribution.
|
||||
The contents of each jar and its dependencies are noted.
|
||||
Dependencies in [brackets] are optional, and are just necessary for certain functionality.
|
||||
|
||||
* org.springframework.webflow-2.0.4.RELEASE.jar
|
||||
* org.springframework.webflow-2.0.5.RELEASE.jar
|
||||
- Contents: The Spring Web Flow system
|
||||
- Dependencies: Commons Logging, spring-core, spring-beans, spring-context, spring-binding, spring-web, spring-webmvc-servlet, spring-js
|
||||
[Log4J, Xerces, XML APIs, OGNL, EL API, JPA API, Hibernate, Spring Security, Servlet API, Portlet API, JUnit]
|
||||
|
||||
* org.springframework.binding-2.0.4.RELEASE.jar
|
||||
* org.springframework.binding-2.0.5.RELEASE.jar
|
||||
- Contents: The Spring Data Binding framework, a utility library used by Web Flow
|
||||
- Dependencies: Commons Logging, spring-beans, spring-core, spring-context
|
||||
[Log4J, OGNL, EL API]
|
||||
|
||||
* org.springframework.js-2.0.4.RELEASE.jar
|
||||
* org.springframework.js-2.0.5.RELEASE.jar
|
||||
- Contents: The Spring JavaScript module, containing Spring's Dojo integration and additional JavaScript functionality.
|
||||
- Dependencies: Dojo Toolkit
|
||||
|
||||
* org.springframework.faces-2.0.4.RELEASE.jar
|
||||
* org.springframework.faces-2.0.5.RELEASE.jar
|
||||
- Contents: The Spring Faces module, containing Spring's integration with Java Server Faces (JSF) and additional JSF functionality.
|
||||
- Dependencies: spring-webflow, spring-js, JSF API
|
||||
|
||||
@@ -102,19 +102,19 @@ Then declare the following dependencies:
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.binding</artifactId>
|
||||
<version>2.0.4.RELEASE</version>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.js</artifactId>
|
||||
<version>2.0.4.RELEASE</version>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.webflow</artifactId>
|
||||
<version>2.0.4.RELEASE</version>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
If using JavaServerFaces:
|
||||
@@ -122,7 +122,7 @@ If using JavaServerFaces:
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.faces</artifactId>
|
||||
<version>2.0.4.RELEASE</version>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
To access jars using Ivy, add the following repositories to your Ivy config:
|
||||
@@ -139,13 +139,13 @@ To access jars using Ivy, add the following repositories to your Ivy config:
|
||||
|
||||
Then declare the following dependencies in your ivy.xml:
|
||||
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.binding" rev="2.0.4.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="2.0.4.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="2.0.4.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.binding" rev="2.0.5.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="2.0.5.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="2.0.5.RELEASE" conf="compile->runtime" />
|
||||
|
||||
If using JavaServerFaces:
|
||||
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.faces" rev="2.0.4.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.faces" rev="2.0.5.RELEASE" conf="compile->runtime" />
|
||||
|
||||
Refer to the reference documentation for more coverage on obtaining Web Flow jars using Maven or Ivy.
|
||||
|
||||
|
||||
@@ -186,23 +186,50 @@ public class CustomMultiAction extends MultiAction {
|
||||
The result is treated as a flow event which the calling flow can then respond to.
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<evaluate expression="bookingAction.makeBooking(booking, messageContext)" />]]>
|
||||
<evaluate expression="bookingAction.makeBooking(booking, flowRequestContext)" />]]>
|
||||
</programlisting>
|
||||
<programlisting language="java"><![CDATA[
|
||||
public class BookingAction {
|
||||
public String makeBooking(Booking booking, MessageContext context) {
|
||||
public String makeBooking(Booking booking, RequestContext context) {
|
||||
try {
|
||||
bookingService.make(booking);
|
||||
BookingConfirmation confirmation = bookingService.make(booking);
|
||||
context.getFlowScope().put("confirmation", confirmation);
|
||||
return "success";
|
||||
} catch (RoomNotAvailableException e) {
|
||||
context.addMessage(builder.error().
|
||||
context.addMessage(new MessageBuilder().error().
|
||||
.defaultText("No room is available at this hotel").build());
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>Handling a business exception with a MultiAction</title>
|
||||
<para>
|
||||
The following example is functionally equivlant to the last, but implemented as a MultiAction instead of a POJO action.
|
||||
The MultiAction requires its action methods to be of the signature <code>Event ${methodName}(RequestContext)</code>, providing stronger type safety, while a POJO action allows for more freedom.
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<evaluate expression="bookingAction.makeBooking" />]]>
|
||||
</programlisting>
|
||||
<programlisting language="java"><![CDATA[
|
||||
public class BookingAction extends MultiAction {
|
||||
public Event makeBooking(RequestContext context) {
|
||||
try {
|
||||
Booking booking = (Booking) context.getFlowScope().get("booking");
|
||||
BookingConfirmation confirmation = bookingService.make(booking);
|
||||
context.getFlowScope().put("confirmation", confirmation);
|
||||
return success();
|
||||
} catch (RoomNotAvailableException e) {
|
||||
context.getMessageContext().addMessage(new MessageBuilder().error().
|
||||
.defaultText("No room is available at this hotel").build());
|
||||
return error();
|
||||
}
|
||||
}
|
||||
}]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1 id="action-examples">
|
||||
<title>Other Action execution examples</title>
|
||||
|
||||
Reference in New Issue
Block a user