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: NamedBeanPrefix.java 3693 2007-03-14 10:55:56Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.submission;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.site.ValidationError;
12: import java.util.Set;
13:
14: public class NamedBeanPrefix extends Element {
15: public void processElement() {
16: BeanImpl bean = getNamedSubmissionBean("bean",
17: "the_bean_prefix");
18: boolean notnumeric_int = false;
19: boolean notnumeric_double = false;
20: boolean notnumeric_longobject = false;
21:
22: Set<ValidationError> errors = bean.getValidationErrors();
23: for (ValidationError error : errors) {
24: print(error.getIdentifier() + " : " + error.getSubject()
25: + "\n");
26: }
27: print(bean.getEnum() + "," + bean.getString() + ","
28: + bean.getStringbuffer() + "," + bean.getInt() + ","
29: + bean.getInteger() + "," + bean.getChar() + ","
30: + bean.getCharacter() + "," + bean.isBoolean() + ","
31: + bean.getBooleanObject() + "," + bean.getByte() + ","
32: + bean.getByteObject() + "," + bean.getDouble() + ","
33: + bean.getDoubleObject() + "," + bean.getFloat() + ","
34: + bean.getFloatObject() + "," + bean.getLong() + ","
35: + bean.getLongObject() + "," + bean.getShort() + ","
36: + bean.getShortObject());
37: }
38: }
|