cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/javaflow/samples/forms form1.xml
Date Fri, 07 May 2004 21:32:32 GMT
mpo         2004/05/07 14:32:32

  Modified:    src/blocks/ojb/samples/forms success.xsp
               src/documentation/xdocs/userdocs/forms widget_row_action.xml
               src/blocks/javaflow/samples/forms form1.xml
  Log:
  Fixing some left-over references to the old getWidget() to the new lookupWidget()
  
  Revision  Changes    Path
  1.2       +3 -3      cocoon-2.1/src/blocks/ojb/samples/forms/success.xsp
  
  Index: success.xsp
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/ojb/samples/forms/success.xsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- success.xsp	11 Mar 2004 16:59:50 -0000	1.1
  +++ success.xsp	7 May 2004 21:32:32 -0000	1.2
  @@ -28,9 +28,9 @@
       <content>
         <xsp:logic>
           Form form = (Form)request.getAttribute("employeeform");
  -        Field fid = (Field)form.getWidget("id");
  -        Field fname = (Field)form.getWidget("name");
  -        Field fdepartment_id = (Field)form.getWidget("department_id");
  +        Field fid = (Field)form.lookupWidget("id");
  +        Field fname = (Field)form.lookupWidget("name");
  +        Field fdepartment_id = (Field)form.lookupWidget("department_id");
         </xsp:logic>
         <p>The values of the form:</p>
         ID: <xsp:expr>fid.getValue()</xsp:expr>
  
  
  
  1.3       +1 -1      cocoon-2.1/src/documentation/xdocs/userdocs/forms/widget_row_action.xml
  
  Index: widget_row_action.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/forms/widget_row_action.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- widget_row_action.xml	24 Apr 2004 12:09:03 -0000	1.2
  +++ widget_row_action.xml	7 May 2004 21:32:32 -0000	1.3
  @@ -57,7 +57,7 @@
         <p>Then, you can access the submitted row either using an event handler
         with event.getSourceWidget().getParent(), or from the flow using
         form.getWidget().getSubmitWidget().getParent(). The row itself has a
  -      getWidget(widgetName) method that can be used to access specific
  +      lookupWidget(widgetName) method that can be used to access specific
         widgets for the row.</p>
       </s1>
     </body>
  
  
  
  1.3       +4 -4      cocoon-2.1/src/blocks/javaflow/samples/forms/form1.xml
  
  Index: form1.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/javaflow/samples/forms/form1.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- form1.xml	5 Apr 2004 12:34:23 -0000	1.2
  +++ form1.xml	7 May 2004 21:32:32 -0000	1.3
  @@ -100,7 +100,7 @@
             java.lang.System.err.println("Was here!");
             var newValue = event.source.value;
             if (newValue != null) {
  -            var number2 = event.source.parent.getWidget("number2");
  +            var number2 = event.source.lookupWidget("../number2");
               if (number2.value == null) {
                 number2.setValue(new java.lang.Long(newValue.intValue() + 1));
               }
  @@ -246,10 +246,10 @@
         	    // Get the row
         	    var row = widget.getRow(i);
         	    // Compute a key combining the first and last name
  -      	    var key = row.getWidget("firstname").value + "/" + row.getWidget("lastname").value;
  +      	    var key = row.lookupWidget("firstname").value + "/" + row.getWidget("lastname").value;
         	    if (list.contains(key)) {
         	      // already in the list
  -      	      row.getWidget("firstname").setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("Duplicate
contact name", false));
  +      	      row.lookupWidget("firstname").setValidationError(new Packages.org.apache.cocoon.forms.validation.ValidationError("Duplicate
contact name", false));
         	      success = false;
         	      break; // no need to continue
         	    }
  
  
  

Mime
View raw message