Title: [1398] trunk/web/web-runner/src/main/webapp/ftl/scenario: JBEHAVE-213: Support different form action methods in scenario submission.
Revision
1398
Author
mauro
Date
2009-12-07 11:06:29 -0600 (Mon, 07 Dec 2009)

Log Message

JBEHAVE-213:  Support different form action methods in scenario submission.

Modified Paths

Diff

Modified: trunk/web/web-runner/src/main/java/org/jbehave/web/runner/waffle/controllers/ScenarioContext.java (1397 => 1398)

--- trunk/web/web-runner/src/main/java/org/jbehave/web/runner/waffle/controllers/ScenarioContext.java	2009-12-03 21:47:24 UTC (rev 1397)
+++ trunk/web/web-runner/src/main/java/org/jbehave/web/runner/waffle/controllers/ScenarioContext.java	2009-12-07 17:06:29 UTC (rev 1398)
@@ -11,26 +11,38 @@
 
 public class ScenarioContext {
 
-	private static final String EMPTY = "";
+	private static final String POST = "post";
+    private static final String EMPTY = "";
 	private static final List<String> EMPTY_LIST = asList();
 
+    private String method;
 	private String input;
 	private String output;
 	private List<String> messages;
 	private Throwable cause;
 
 	public ScenarioContext() {
-		this(EMPTY, EMPTY, EMPTY_LIST);
+		this(POST, EMPTY, EMPTY, EMPTY_LIST);
 	}
 
-	public ScenarioContext(String input, String output, List<String> messages) {
-		this.input = input;
+	public ScenarioContext(String method, String input, String output, List<String> messages) {
+		this.method = method;
+        this.input = input;
 		this.output = output;
 		this.messages = new ArrayList<String>();
 		this.messages.addAll(messages);
 	}
 
-	public String getInput() {
+	
+	public String getMethod() {
+        return method;
+    }
+
+    public void setMethod(String method) {
+        this.method = method;
+    }
+
+    public String getInput() {
 		return input;
 	}
 

Modified: trunk/web/web-runner/src/main/webapp/ftl/scenario/scenario.ftl (1397 => 1398)

--- trunk/web/web-runner/src/main/webapp/ftl/scenario/scenario.ftl	2009-12-03 21:47:24 UTC (rev 1397)
+++ trunk/web/web-runner/src/main/webapp/ftl/scenario/scenario.ftl	2009-12-07 17:06:29 UTC (rev 1398)
@@ -7,7 +7,7 @@
 </head>
 <#include "/ftl/navigation.ftl" parse="true">
 <div id="content">
-    <form action=""
+    <form action="" method="${scenarioContext.method}">
     
         <#include "/ftl/errors.ftl" parse="true">
         <div id="scenarioInput">


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to