You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2003/08/12 14:55:43 UTC
cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel Widget.java Repeater.java AbstractWidget.java
bruno 2003/08/12 05:55:43
Modified: src/blocks/woody/java/org/apache/cocoon/woody/formmodel
Widget.java Repeater.java AbstractWidget.java
Log:
Added getValue() method to Widget interface
Revision Changes Path
1.4 +6 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Widget.java
Index: Widget.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Widget.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Widget.java 3 Jul 2003 09:03:19 -0000 1.3
+++ Widget.java 12 Aug 2003 12:55:43 -0000 1.4
@@ -155,6 +155,12 @@
public Object getValue();
/**
+ * Sets the value of this widget to the given object. Some widgets may not support this
+ * method, those should throw an runtime exception if you try to set their value anyway.
+ */
+ public void setValue(Object object);
+
+ /**
* Returns wether this widget is required to be filled in. As with {@link #getValue}, for some
* widgets this may not make sense, those should return false here.
*/
1.7 +4 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java
Index: Repeater.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Repeater.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Repeater.java 3 Jul 2003 09:03:19 -0000 1.6
+++ Repeater.java 12 Aug 2003 12:55:43 -0000 1.7
@@ -291,6 +291,10 @@
return null;
}
+ public void setValue(Object object) {
+ throw new RuntimeException("Cannot set the value of widget " + getFullyQualifiedId());
+ }
+
public boolean isRequired() {
return false;
}
1.3 +4 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidget.java
Index: AbstractWidget.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AbstractWidget.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractWidget.java 3 Jul 2003 09:03:19 -0000 1.2
+++ AbstractWidget.java 12 Aug 2003 12:55:43 -0000 1.3
@@ -85,6 +85,10 @@
return null;
}
+ public void setValue(Object object) {
+ throw new RuntimeException("Cannot set the value of widget " + getFullyQualifiedId());
+ }
+
public boolean isRequired() {
return false;
}