Return-Path: Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 62238 invoked by uid 500); 15 Jul 2003 14:12:28 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 62193 invoked by uid 500); 15 Jul 2003 14:12:26 -0000 Delivered-To: apmail-cocoon-2.1-cvs@apache.org Received: (qmail 62186 invoked from network); 15 Jul 2003 14:12:26 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 15 Jul 2003 14:12:26 -0000 Received: (qmail 94099 invoked by uid 1638); 15 Jul 2003 14:12:25 -0000 Date: 15 Jul 2003 14:12:25 -0000 Message-ID: <20030715141225.94098.qmail@icarus.apache.org> From: bruno@apache.org To: cocoon-2.1-cvs@apache.org Subject: cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/samples InitForm1Action.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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();