action examples
This commit is contained in:
@@ -239,7 +239,7 @@
|
||||
This flow now creates a Booking object in flow scope when it starts.
|
||||
The id of the hotel to book is obtained from a flow input attribute.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect2>
|
||||
</sect1>
|
||||
<sect1 id="flow-inputoutput">
|
||||
<title>Input/Output Mapping</title>
|
||||
@@ -273,6 +273,7 @@ public interface FlowOutcome {
|
||||
For example, the input above would be saved under the name <code>hotelId</code>.
|
||||
</para>
|
||||
<sect3 id="input-element-type">
|
||||
<title>Declaring an input type</title>
|
||||
<para>
|
||||
Use the <code>type</code> attribute to declare the input attribute's type:
|
||||
</para>
|
||||
@@ -284,6 +285,7 @@ public interface FlowOutcome {
|
||||
</para>
|
||||
</sect3>
|
||||
<sect3 id="input-element-value">
|
||||
<title>Assigning an input value</title>
|
||||
<para>
|
||||
Use the <code>value</code> attribute to specify an expression to assign the input value to:
|
||||
</para>
|
||||
@@ -295,6 +297,7 @@ public interface FlowOutcome {
|
||||
</para>
|
||||
</sect3>
|
||||
<sect3 id="input-element-required">
|
||||
<title>Marking a input as required</title>
|
||||
<para>
|
||||
Use the <code>required</code> attribute to enforce the input is not null or empty:
|
||||
</para>
|
||||
@@ -319,6 +322,7 @@ public interface FlowOutcome {
|
||||
For example, the output above would be assigned the value of the <code>bookingId</code> variable.
|
||||
</para>
|
||||
<sect3 id="output-element-value">
|
||||
<title>Specifying the source of an output value</title>
|
||||
<para>
|
||||
Use the <code>value</code> attribute to denote a specific output value expression:
|
||||
</para>
|
||||
@@ -469,13 +473,13 @@ public interface FlowOutcome {
|
||||
|
||||
<subflow-state id="addGuest" subflow="createGuest">
|
||||
<transition on="guestCreated" to="reviewBooking">
|
||||
<evaluate expression="booking.guests.add(currentEvent.attributes.guest)"/>
|
||||
<evaluate expression="booking.guests.add(currentEvent.attributes.guest)" />
|
||||
</transition>
|
||||
<transition on="creationCancelled" to="reviewBooking" />
|
||||
</subfow-state>
|
||||
|
||||
<end-state id="bookingConfirmed" >
|
||||
<output name="bookingId" value="booking.id"/>
|
||||
<output name="bookingId" value="booking.id" />
|
||||
</end-state>
|
||||
|
||||
<end-state id="bookingCancelled" />
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
Web Flow attempts to use the <ulink url="http://en.wikipedia.org/wiki/Unified_Expression_Language">Unified EL</ulink> by default.
|
||||
<code>jboss-el</code> is currently the default EL implementation.
|
||||
When found in your classpath along with the <code>el-api</code>, it will be used automatically.
|
||||
You can find the JBoss EL jar in the <ulink url="http://www.springsource.com/repository/app/bundle/detail?name=com.springsource.org.jboss.el">SpringSource Bundle Repository</ulink>.
|
||||
<note>
|
||||
The <code>el-api</code> dependency is typically <emphasis>provided</emphasis> by your web container. Tomcat 6 includes it, for example.
|
||||
</note>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<sect1 id="jars">
|
||||
<title>How to obtain Web Flow artifacts from the SpringSource Bundle Repository</title>
|
||||
<para>
|
||||
Each jar in the Web Flow distribution is available in the <ulink url="http://www.springsource.com/repository/">SpringSource Enterprise Bundle Repository</ulink> for use in an OSGi environment.
|
||||
Each jar in the Web Flow distribution is available in the <ulink url="http://www.springsource.com/repository/">SpringSource Enterprise Bundle Repository</ulink>.
|
||||
These jars may be accessed using Maven or Ivy dependency managers.
|
||||
</para>
|
||||
<sect2 id="jars-maven">
|
||||
@@ -88,19 +88,19 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.binding</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.js</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.webflow</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -111,7 +111,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.faces</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -141,11 +141,11 @@
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.binding"
|
||||
rev="2.0.2.RELEASE" conf="compile->runtime" />
|
||||
rev="2.0.3.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.js"
|
||||
rev="2.0.2.RELEASE" conf="compile->runtime" />
|
||||
rev="2.0.3.RELEASE" conf="compile->runtime" />
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.webflow"
|
||||
rev="2.0.2.RELEASE" conf="compile->runtime" />
|
||||
rev="2.0.3.RELEASE" conf="compile->runtime" />
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
@@ -153,7 +153,7 @@
|
||||
</para>
|
||||
<programlisting language="xml"><![CDATA[
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.faces"
|
||||
rev="2.0.2.RELEASE" conf="compile->runtime" />
|
||||
rev="2.0.3.RELEASE" conf="compile->runtime" />
|
||||
]]>
|
||||
</programlisting>
|
||||
</sect2>
|
||||
@@ -162,8 +162,6 @@
|
||||
<title>How to obtain Web Flow artifacts from Maven Central</title>
|
||||
<para>
|
||||
Each jar in the Web Flow distribution is also available in the <ulink url="http://repo1.maven.org/maven2/">Maven Central Repository</ulink>.
|
||||
The large majority of artifacts retrieved from this repository are not OSGi bundles.
|
||||
If you wish to run your Web Flows in an OSGi environment, you are encouraged to use the <link linkend="jars">SpringSource Bundle Repository</link>.
|
||||
</para>
|
||||
<para>
|
||||
To access Web Flow jars from Maven Central, declare the following dependencies in your pom:
|
||||
@@ -172,19 +170,19 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.binding</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.js</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.webflow</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
]]>
|
||||
</programlisting>
|
||||
@@ -195,7 +193,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.webflow</groupId>
|
||||
<artifactId>org.springframework.faces</artifactId>
|
||||
<version>2.0.2.RELEASE</version>
|
||||
<version>2.0.3.RELEASE</version>
|
||||
</dependency>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<!ENTITY defining-flows SYSTEM "defining-flows.xml">
|
||||
<!ENTITY el SYSTEM "el.xml">
|
||||
<!ENTITY views SYSTEM "views.xml">
|
||||
<!ENTITY actions SYSTEM "actions.xml">
|
||||
<!ENTITY flow-managed-persistence SYSTEM "flow-managed-persistence.xml">
|
||||
<!ENTITY flow-security SYSTEM "flow-security.xml">
|
||||
<!ENTITY flow-inheritance SYSTEM "flow-inheritance.xml">
|
||||
@@ -23,43 +24,28 @@
|
||||
<bookinfo>
|
||||
<title>Spring Web Flow 2 Reference Guide</title>
|
||||
<subtitle>Reference Documentation</subtitle>
|
||||
<releaseinfo>Version 2.0.2</releaseinfo>
|
||||
<pubdate>June 2008</pubdate>
|
||||
<releaseinfo>Version 2.0.3</releaseinfo>
|
||||
<pubdate>July 2008</pubdate>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Keith</firstname>
|
||||
<surname>Donald</surname>
|
||||
<affiliation>
|
||||
<orgname>SpringSource</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Erwin</firstname>
|
||||
<surname>Vervaet</surname>
|
||||
<affiliation>
|
||||
<orgname>Ervacon</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Jeremy</firstname>
|
||||
<surname>Grelle</surname>
|
||||
<affiliation>
|
||||
<orgname>SpringSource</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Scott</firstname>
|
||||
<surname>Andrews</surname>
|
||||
<affiliation>
|
||||
<orgname>SpringSource</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Rossen</firstname>
|
||||
<surname>Stoyanchev</surname>
|
||||
<affiliation>
|
||||
<orgname>SpringSource</orgname>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
<legalnotice>
|
||||
@@ -79,6 +65,7 @@
|
||||
&defining-flows;
|
||||
⪙
|
||||
&views;
|
||||
&actions;
|
||||
&flow-managed-persistence;
|
||||
&flow-security;
|
||||
&flow-inheritance;
|
||||
|
||||
Reference in New Issue
Block a user