cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/samples InitForm1Action.java
Date Tue, 15 Jul 2003 14:12:25 GMT
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();
  
  
  

Mime
View raw message