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: BeanParent.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.inheritance;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.engine.testelements.outputs.BeanImpl;
12:
13: public class BeanParent extends Element {
14: public void processElement() {
15: if (hasSubmission("activatechild")) {
16: BeanImpl bean = new BeanImpl();
17: bean.setLong(34347897L);
18: setOutputBean(bean);
19: }
20:
21: print("<html><body><a href=\""
22: + getSubmissionQueryUrl("activatechild")
23: + "\">activate child</a></body></html>");
24: }
25:
26: public boolean childTriggered(String name, String[] values) {
27: if (name.equals("long") && Long.parseLong(values[0]) > 20) {
28: return true;
29: } else {
30: return false;
31: }
32: }
33: }
|