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: NamedBeanPrefixInjection.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 NamedBeanPrefixInjection extends Element {
15: private BeanImpl bean;
16:
17: public void setThe_bean_prefix(BeanImpl bean) {
18: this .bean = bean;
19: }
20:
21: public void processElement() {
22: boolean notnumeric_int = false;
23: boolean notnumeric_double = false;
24: boolean notnumeric_longobject = false;
25:
26: Set<ValidationError> errors = bean.getValidationErrors();
27: for (ValidationError error : errors) {
28: print(error.getIdentifier() + " : " + error.getSubject()
29: + "\n");
30: }
31: print(bean.getEnum() + "," + bean.getString() + ","
32: + bean.getStringbuffer() + "," + bean.getInt() + ","
33: + bean.getInteger() + "," + bean.getChar() + ","
34: + bean.getCharacter() + "," + bean.isBoolean() + ","
35: + bean.getBooleanObject() + "," + bean.getByte() + ","
36: + bean.getByteObject() + "," + bean.getDouble() + ","
37: + bean.getDoubleObject() + "," + bean.getFloat() + ","
38: + bean.getFloatObject() + "," + bean.getLong() + ","
39: + bean.getLongObject() + "," + bean.getShort() + ","
40: + bean.getShortObject());
41: }
42: }
|