[cvs] expresso commit by lhamel: add convenience methods
JCorporate Ltd
jcorp at jcorp2.servlets.net
Tue Oct 19 23:32:30 PDT 2004
Log Message:
-----------
add convenience methods get/setDefaultValue() so that Output looks like input for JSTL field refs
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller:
Output.java
Revision Data
-------------
Index: Output.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Output.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Output.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Output.java -u -r1.11 -r1.12
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Output.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Output.java
@@ -126,10 +126,8 @@
*
* @param name The name of this new Output item
* @param c The string contents of the Output item
- * @throws ControllerException
*/
- public Output(String name, String c)
- throws ControllerException {
+ public Output(String name, String c) {
setName(name);
setContent(c);
} /* Output(String, String) */
@@ -413,6 +411,24 @@
return o;
}
+
+ /**
+ * set contents; convenience method to unify Input/Output method names
+ *
+ * @param newContent The new contents string
+ */
+ public synchronized void setDefaultValue(String newContent) {
+ content = newContent;
+ }
+
+ /**
+ * Return contents; convenience method to unify Input/Output method names
+ *
+ * @return A String content
+ */
+ public String getDefaultValue() {
+ return content;
+ } /* getDefaultValue() */
+
} /* Output */
-/* Output */
\ No newline at end of file
More information about the cvs
mailing list