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: GeneratedurlSource.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.exits;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.template.Template;
12:
13: public class GeneratedurlSource extends Element {
14: public String getOutput2() {
15: return "the second";
16: }
17:
18: public String getOutput3() {
19: return "the third value that will be overridden";
20: }
21:
22: public void processElement() {
23: Template template = getHtmlTemplate("engine_exiturl_generation");
24:
25: setOutput("output1", "the first");
26: setOutput("output3", "the third");
27:
28: if (getInput("switch", "").equals("overridden")) {
29: setExitQuery(template, "exit1", new String[] { "output1",
30: "the overridden first", "output3",
31: "the overridden third" });
32: setExitQuery(template, "exit2", new String[] { "output1",
33: "the overridden first", "output3",
34: "the overridden third" });
35: } else {
36: setExitQuery(template, "exit1");
37: }
38:
39: print(template);
40: }
41: }
|