You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by br...@apache.org on 2003/08/26 18:51:47 UTC
cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel AggregateField.java
bruno 2003/08/26 09:51:47
Modified: src/blocks/woody/java/org/apache/cocoon/woody/formmodel
AggregateField.java
Log:
modified the fieldsHaveValues() method to check the values of all fields; if
the values have been set programatically (such as done by the binding) then it
could be that some fields have values while others don't.
Revision Changes Path
1.5 +3 -3 cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateField.java
Index: AggregateField.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/AggregateField.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AggregateField.java 3 Jul 2003 09:03:19 -0000 1.4
+++ AggregateField.java 26 Aug 2003 16:51:47 -0000 1.5
@@ -168,10 +168,10 @@
Iterator fieldsIt = fields.iterator();
while (fieldsIt.hasNext()) {
Field field = (Field)fieldsIt.next();
- if (field.getValue() != null)
- return true;
+ if (field.getValue() == null)
+ return false;
}
- return false;
+ return true;
}
public boolean validate(FormContext formContext) {