cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java FormFlow.java
Date Fri, 07 May 2004 17:47:55 GMT
joerg       2004/05/07 10:47:55

  Modified:    src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java
                        FormInstance.java
               src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java
                        FormFlow.java
  Log:
  fixed compile error due to latest changes in cforms
  
  Revision  Changes    Path
  1.10      +4 -4      cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
  
  Index: FormInstance.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FormInstance.java	1 May 2004 00:05:44 -0000	1.9
  +++ FormInstance.java	7 May 2004 17:47:55 -0000	1.10
  @@ -112,11 +112,11 @@
        * If <code>name</code> is undefined, the form widget itself is returned.
        * Otherwise, the form's child widget of name <code>name</code> is returned.
        */
  -    public Widget getWidget(String name) {
  +    public Widget getChild(String name) {
           if (name == null) {
  -            return this.form/*Widget*/;
  +            return this.form;
           } else {
  -            return this.form/*Widget*/.getWidget(name);
  +            return this.form.getChild(name);
           }
       }
   
  
  
  
  1.7       +5 -5      cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/FormFlow.java
  
  Index: FormFlow.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/java/org/apache/cocoon/samples/flow/java/FormFlow.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FormFlow.java	4 Apr 2004 06:35:08 -0000	1.6
  +++ FormFlow.java	7 May 2004 17:47:55 -0000	1.7
  @@ -34,10 +34,10 @@
   
           FormInstance form = new FormInstance("forms/form1.xml");
   
  -        Field birthDate = (Field) form.getWidget("birthdate");
  +        Field birthDate = (Field) form.getChild("birthdate");
           birthDate.setValue(new Date());
   
  -        Repeater repeater = (Repeater) form.getWidget("contacts");
  +        Repeater repeater = (Repeater) form.getChild("contacts");
           repeater.addRow();
           Field field = (Field) repeater.getWidget(0, "firstname");
           field.setValue("Jules");
  @@ -48,9 +48,9 @@
   
           form.show("form/form1");
   
  -        sendPage("page/form1-result", new VarMap().add("email", ((Field)form.getWidget("email")).getValue())
  -                                                  .add("somebool", ((BooleanField)form.getWidget("somebool")).getValue())
  -                                                  .add("firstname", ((Field)((Repeater)form.getWidget("contacts")).getWidget(1,
"firstname")).getValue()));
  +        sendPage("page/form1-result", new VarMap().add("email", ((Field)form.getChild("email")).getValue())
  +                                                  .add("somebool", ((BooleanField)form.getChild("somebool")).getValue())
  +                                                  .add("firstname", ((Field)((Repeater)form.getChild("contacts")).getWidget(1,
"firstname")).getValue()));
       }
   
       public void doEditForm2() throws BindingException {
  
  
  

Mime
View raw message