01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: PathInfoSource.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.inputs;
09:
10: import com.uwyn.rife.engine.Element;
11:
12: public class PathInfoSource extends Element {
13: public void processElement() {
14: setOutput("exitoutput5", "exitsourcevalue5");
15: switch (getInputInt("switch")) {
16: case 1:
17: setOutput("exitoutput1", "exitsourcevalue1");
18: setOutput("exitoutput2", "523");
19: print("<a href=\"" + getExitQueryUrl("exit") + "\">go</a>");
20: break;
21: case 2:
22: setOutput("exitoutput1", "exitsourcevalue1");
23: setOutput("exitoutput2", "exitsourcevalue2");
24: print("<a href=\"" + getExitQueryUrl("exit") + "\">go</a>");
25: break;
26: case 3:
27: setOutput("exitoutput1", "value1");
28: setOutput("exitoutput2", "222122");
29: setOutput("exitoutput3", "baca");
30: setOutput("exitoutput4", "cdd");
31: print("<a href=\"" + getExitQueryUrl("exit") + "\">go</a>");
32: break;
33: case 4:
34: setOutput("exitoutput1", "exitsourcevalue1");
35: setOutput("exitoutput2", "523");
36: print("<form action=\"" + getExitFormUrl("exit")
37: + "\" method=\"post\">"
38: + getExitFormParameters("exit") + "</form>");
39: break;
40: case 5:
41: setOutput("exitoutput1", "exitsourcevalue1");
42: setOutput("exitoutput2", "exitsourcevalue2");
43: print("<form action=\"" + getExitFormUrl("exit")
44: + "\" method=\"post\">"
45: + getExitFormParameters("exit") + "</form>");
46: break;
47: case 6:
48: setOutput("exitoutput1", "value1");
49: setOutput("exitoutput2", "222122");
50: setOutput("exitoutput3", "baca");
51: setOutput("exitoutput4", "cdd");
52: print("<form action=\"" + getExitFormUrl("exit")
53: + "\" method=\"post\">"
54: + getExitFormParameters("exit") + "</form>");
55: break;
56: }
57: }
58: }
|