bruno 2004/04/17 11:33:56
Modified: src/blocks/forms/samples/forms form1.xml
Log:
replacing tabs with spaces
Revision Changes Path
1.5 +22 -22 cocoon-2.1/src/blocks/forms/samples/forms/form1.xml
Index: form1.xml
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/samples/forms/form1.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- form1.xml 17 Apr 2004 17:51:45 -0000 1.4
+++ form1.xml 17 Apr 2004 18:33:56 -0000 1.5
@@ -235,31 +235,31 @@
<fd:repeater id="contacts">
<fd:validation>
- <!-- This demonstrates validating a repeater: we check here if
all contacts are distinct.
- A repeater cannot itself display a validation error,
and therefore sets a validation
- error on a field in the offenting row. -->
+ <!-- This demonstrates validating a repeater: we check here if all
contacts are distinct.
+ A repeater cannot itself display a validation error, and
therefore sets a validation
+ error on a field in the offenting row. -->
<fd:javascript>
var list = new java.util.ArrayList();
var success = true;
// Iterate on all rows
- for (var i = 0; i < widget.size; i++) {
- // 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;
- if (list.contains(key)) {
- // already in the list
- row.getWidget("firstname").setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("Duplicate contact
name", false));
- success = false;
- break; // no need to continue
- }
- // Add the current row's key to the list
- list.add(key);
- }
-
- // Must return true/false
- return success;
-
+ for (var i = 0; i < widget.size; i++) {
+ // 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;
+ if (list.contains(key)) {
+ // already in the list
+ row.getWidget("firstname").setValidationError(new
Packages.org.apache.cocoon.forms.validation.ValidationError("Duplicate contact
name", false));
+ success = false;
+ break; // no need to continue
+ }
+ // Add the current row's key to the list
+ list.add(key);
+ }
+
+ // Must return true/false
+ return success;
+
</fd:javascript>
</fd:validation>
<fd:widgets>