swf-969
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user