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/07/15 16:12:25 UTC
cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/samples InitForm1Action.java
bruno 2003/07/15 07:12:25
Modified: src/blocks/woody/java/org/apache/cocoon/woody/samples
InitForm1Action.java
Log:
Initialize birthdate field to current date.
Revision Changes Path
1.4 +4 -0 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/samples/InitForm1Action.java
Index: InitForm1Action.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/samples/InitForm1Action.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InitForm1Action.java 14 May 2003 11:33:38 -0000 1.3
+++ InitForm1Action.java 15 Jul 2003 14:12:25 -0000 1.4
@@ -61,6 +61,7 @@
import org.apache.avalon.framework.parameters.Parameters;
import java.util.Map;
+import java.util.Date;
/**
* An action that creates an instance of a specific example form included with Woody,
@@ -74,6 +75,9 @@
String formAttribute = parameters.getParameter("attribute-name");
Form form = formManager.createForm(resolver.resolveURI(formSource));
+
+ Field birthDate = (Field)form.getWidget("birthdate");
+ birthDate.setValue(new Date());
Repeater repeater = (Repeater)form.getWidget("contacts");
repeater.addRow();