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