polish
This commit is contained in:
@@ -2,6 +2,22 @@ SPRING WEB FLOW CHANGELOG
|
|||||||
=========================
|
=========================
|
||||||
http://www.springframework.org/webflow
|
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)
|
Changes in version 2.0.4 (04.11.2008)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
New Features
|
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
|
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.
|
The contents of each jar and its dependencies are noted.
|
||||||
Dependencies in [brackets] are optional, and are just necessary for certain functionality.
|
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
|
- Contents: The Spring Web Flow system
|
||||||
- Dependencies: Commons Logging, spring-core, spring-beans, spring-context, spring-binding, spring-web, spring-webmvc-servlet, spring-js
|
- 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]
|
[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
|
- Contents: The Spring Data Binding framework, a utility library used by Web Flow
|
||||||
- Dependencies: Commons Logging, spring-beans, spring-core, spring-context
|
- Dependencies: Commons Logging, spring-beans, spring-core, spring-context
|
||||||
[Log4J, OGNL, EL API]
|
[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.
|
- Contents: The Spring JavaScript module, containing Spring's Dojo integration and additional JavaScript functionality.
|
||||||
- Dependencies: Dojo Toolkit
|
- 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.
|
- 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
|
- Dependencies: spring-webflow, spring-js, JSF API
|
||||||
|
|
||||||
@@ -102,19 +102,19 @@ Then declare the following dependencies:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.webflow</groupId>
|
<groupId>org.springframework.webflow</groupId>
|
||||||
<artifactId>org.springframework.binding</artifactId>
|
<artifactId>org.springframework.binding</artifactId>
|
||||||
<version>2.0.4.RELEASE</version>
|
<version>2.0.5.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.webflow</groupId>
|
<groupId>org.springframework.webflow</groupId>
|
||||||
<artifactId>org.springframework.js</artifactId>
|
<artifactId>org.springframework.js</artifactId>
|
||||||
<version>2.0.4.RELEASE</version>
|
<version>2.0.5.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.webflow</groupId>
|
<groupId>org.springframework.webflow</groupId>
|
||||||
<artifactId>org.springframework.webflow</artifactId>
|
<artifactId>org.springframework.webflow</artifactId>
|
||||||
<version>2.0.4.RELEASE</version>
|
<version>2.0.5.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
If using JavaServerFaces:
|
If using JavaServerFaces:
|
||||||
@@ -122,7 +122,7 @@ If using JavaServerFaces:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.webflow</groupId>
|
<groupId>org.springframework.webflow</groupId>
|
||||||
<artifactId>org.springframework.faces</artifactId>
|
<artifactId>org.springframework.faces</artifactId>
|
||||||
<version>2.0.4.RELEASE</version>
|
<version>2.0.5.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
To access jars using Ivy, add the following repositories to your Ivy config:
|
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:
|
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.binding" rev="2.0.5.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.js" rev="2.0.5.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.webflow" rev="2.0.5.RELEASE" conf="compile->runtime" />
|
||||||
|
|
||||||
If using JavaServerFaces:
|
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.
|
Refer to the reference documentation for more coverage on obtaining Web Flow jars using Maven or Ivy.
|
||||||
|
|
||||||
|
|||||||
@@ -186,20 +186,47 @@ public class CustomMultiAction extends MultiAction {
|
|||||||
The result is treated as a flow event which the calling flow can then respond to.
|
The result is treated as a flow event which the calling flow can then respond to.
|
||||||
</para>
|
</para>
|
||||||
<programlisting language="xml"><![CDATA[
|
<programlisting language="xml"><![CDATA[
|
||||||
<evaluate expression="bookingAction.makeBooking(booking, messageContext)" />]]>
|
<evaluate expression="bookingAction.makeBooking(booking, flowRequestContext)" />]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<programlisting language="java"><![CDATA[
|
<programlisting language="java"><![CDATA[
|
||||||
public class BookingAction {
|
public class BookingAction {
|
||||||
public String makeBooking(Booking booking, MessageContext context) {
|
public String makeBooking(Booking booking, RequestContext context) {
|
||||||
try {
|
try {
|
||||||
bookingService.make(booking);
|
BookingConfirmation confirmation = bookingService.make(booking);
|
||||||
|
context.getFlowScope().put("confirmation", confirmation);
|
||||||
return "success";
|
return "success";
|
||||||
} catch (RoomNotAvailableException e) {
|
} catch (RoomNotAvailableException e) {
|
||||||
context.addMessage(builder.error().
|
context.addMessage(new MessageBuilder().error().
|
||||||
.defaultText("No room is available at this hotel").build());
|
.defaultText("No room is available at this hotel").build());
|
||||||
return "error";
|
return "error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}]]>
|
||||||
|
</programlisting>
|
||||||
|
</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>
|
</programlisting>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|||||||
Reference in New Issue
Block a user