[cvs] eforum commit by ppilgrim: Register in CVS
JCorporate Ltd
jcorp at jcorporate.com
Mon Dec 27 23:58:00 UTC 2004
Log Message:
-----------
Register in CVS
Added Files:
-----------
eforum/src/WEB-INF/src/com/jcorporate/eforum:
ForumLazyDynaBean.java
Revision Data
-------------
--- /dev/null
+++ src/WEB-INF/src/com/jcorporate/eforum/ForumLazyDynaBean.java
@@ -0,0 +1,145 @@
+/**
+ * Created on 07-Dec-2004
+ */
+package com.jcorporate.eforum;
+
+import org.apache.commons.beanutils.ConversionException;
+import org.apache.commons.beanutils.DynaClass;
+import org.apache.commons.beanutils.LazyDynaBean;
+
+/**
+ * An extension of the BasicDynaBean that exposes the map
+ * collection for the benefit of JSTL access.
+ *
+ * <p>
+ * DynaActionForm, which implements DynaBean, contains a
+ * <code>getMap()</code> method; however, DynaBean does not
+ * expose the backing Map in a public property.
+ * To use a DynaBean with JSTL, you could create your
+ * own extension that exposed the protected 'values' HashMap
+ * using a public getter method.
+ *
+ * <p>
+ * Thanks to Bill Siggelkow
+ *
+ * <p>
+ *
+ * @author peterp, 07-Dec-2004
+ * @version $Id: ForumLazyDynaBean.java,v 1.1 2004/12/27 23:57:59 ppilgrim Exp $
+ */
+public class ForumLazyDynaBean extends LazyDynaBean {
+
+ /**
+ * Default constructor
+ */
+ public ForumLazyDynaBean() {
+ super();
+ }
+
+ /**
+ * Standard constructor
+ * @param arg0
+ */
+ public ForumLazyDynaBean(String arg0) {
+ super(arg0);
+ }
+
+ /**
+ * Standard constructor
+ * @param arg0 the dyna class object
+ */
+ public ForumLazyDynaBean(DynaClass arg0) {
+ super(arg0);
+ }
+
+ /**
+ * A convenience method to set a <code>boolean</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setBoolean( String name, boolean value )
+ throws ConversionException
+ {
+ set( name, new Boolean(value) );
+ }
+
+ /**
+ * A convenience method to set a <code>char</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setChar( String name, char value )
+ throws ConversionException
+ {
+ set( name, new Character(value) );
+ }
+
+ /**
+ * A convenience method to set a <code>short</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setShort( String name, int value )
+ throws ConversionException
+ {
+ set( name, new Integer(value) );
+ }
+
+ /**
+ * A convenience method to set <code>int</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setInt( String name, int value )
+ throws ConversionException
+ {
+ set( name, new Integer(value) );
+ }
+
+ /**
+ * A convenience method to set a <code>long</code> integer value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setLong( String name, long value )
+ throws ConversionException
+ {
+ set( name, new Long(value) );
+ }
+
+ /**
+ * A convenience method to set a <code>float</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setFloat( String name, float value )
+ throws ConversionException
+ {
+ set( name, new Float(value) );
+ }
+
+ /**
+ * A convenience method to set a <code>double</code> value
+ * @param name Name of the property whose value is to be set
+ * @param value Value to which this property is to be set
+ * @throws ConversionException if the specified value cannot be converted
+ * to the type required for this property
+ */
+ public void setDouble( String name, double value )
+ throws ConversionException
+ {
+ set( name, new Double(value) );
+ }
+}
More information about the cvs
mailing list