This commit is contained in:
Keith Donald
2008-12-10 21:31:41 +00:00
parent ddddb4ca22
commit 974270591c
3 changed files with 54 additions and 1 deletions

View File

@@ -389,7 +389,7 @@
</xsl:attribute>
</xsl:if>
</xsl:if>
<xsl:if test="(local-name(../..) = 'flow' and local-name(..) = 'output-mapper') or (local-name(../../..) = 'subflow-state' and local-name(..) = 'input-mapper') or (local-name(../../..) = 'end-state' and local-name(..) = 'output-mapper')">
<xsl:if test="(local-name(../..) = 'flow' and local-name(..) = 'output-mapper') or (local-name(../../..) = 'subflow-state' and local-name(..) = 'input-mapper') or (local-name(../..) = 'end-state' and local-name(..) = 'output-mapper')">
<xsl:if test="@target">
<xsl:attribute name="name">
<xsl:variable name="stripElParam">

View File

@@ -0,0 +1,13 @@
package org.springframework.webflow.upgrade;
import junit.framework.TestCase;
import org.springframework.core.io.ClassPathResource;
public class WebFlowUpgraderTests extends TestCase {
public void testConvertFlow1() {
WebFlowUpgrader upgrader = new WebFlowUpgrader();
String result = upgrader.convert(new ClassPathResource("flow1.xml", getClass()));
System.out.println(result);
}
}

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<var name="list" class="java.util.ArrayList" />
<start-state idref="displayItemlist" />
<view-state id="displayItemlist" view="itemlist">
<transition on="add" to="addItem" />
</view-state>
<subflow-state id="addItem" flow="item">
<attribute-mapper>
<output-mapper>
<mapping source="item" target-collection="flowScope.list" />
</output-mapper>
</attribute-mapper>
<transition on="finish" to="displayItemlist" />
</subflow-state>
<inline-flow id="item">
<flow>
<start-state idref="displayItem"/>
<view-state id="displayItem" view="item">
<transition on="submit" to="finish" />
</view-state>
<end-state id="finish">
<output-mapper>
<mapping source="requestParameters.data" target="item" />
</output-mapper>
</end-state>
</flow>
</inline-flow>
</flow>