bruno       2003/11/13 05:18:36

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/formmodel
                        Field.java MultiValueField.java
  Log:
  Mention "woody" i18n catalogue explicitely
  
  Revision  Changes    Path
  1.17      +8 -6      
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java
  
  Index: Field.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/Field.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Field.java        6 Nov 2003 21:33:28 -0000       1.16
  +++ Field.java        13 Nov 2003 13:18:35 -0000      1.17
  @@ -52,6 +52,7 @@
   
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.woody.util.I18nMessage;
   import org.apache.cocoon.woody.datatype.ValidationError;
   import org.apache.cocoon.woody.datatype.SelectionList;
   import org.apache.cocoon.woody.datatype.Datatype;
  @@ -122,11 +123,12 @@
   
                   if (this.value == null) {
                       // Conversion failed
  -                    this.validationError = new ValidationError(
  +                    this.validationError = new ValidationError(new 
I18nMessage(
                           "datatype.conversion-failed",
                           new String[] {"datatype." + 
definition.getDatatype().getDescriptiveName()},
  -                        new boolean[] { true }
  -                    );
  +                        new boolean[] { true },
  +                        Constants.I18N_CATALOGUE
  +                    ));
   
                       // No need for further validation (and need to keep the 
above error)
                       this.needsValidate = false;
  @@ -154,7 +156,7 @@
                   if (this.value == null) {
                       // No value : is it required ?
                       if (this.definition.isRequired()) {
  -                        this.validationError = new 
ValidationError("general.field-required");
  +                        this.validationError = new ValidationError(new 
I18nMessage("general.field-required", Constants.I18N_CATALOGUE));
                       }
   
                   } else {
  @@ -344,7 +346,7 @@
        * <p>Access to the values of the above mentioned properties is done
        * via <a 
href="http://jakarta.apache.org/commons/jxpath/users-guide.html";>XPath</a> 
expressions.
        * @param model The collection used as a model for the selection list. 
  -     * @param keyPath An XPath expression referring to the attribute used
  +     * @param valuePath An XPath expression referring to the attribute used
        * to populate the values of the list's items. 
        * @param labelPath An XPath expression referring to the attribute used
        * to populate the labels of the list's items.
  
  
  
  1.9       +2 -1      
cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java
  
  Index: MultiValueField.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/formmodel/MultiValueField.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- MultiValueField.java      24 Oct 2003 22:49:08 -0000      1.8
  +++ MultiValueField.java      13 Nov 2003 13:18:35 -0000      1.9
  @@ -55,6 +55,7 @@
   import org.apache.cocoon.woody.event.ValueChangedEvent;
   import org.apache.cocoon.woody.Constants;
   import org.apache.cocoon.woody.FormContext;
  +import org.apache.cocoon.woody.util.I18nMessage;
   import org.apache.cocoon.xml.AttributesImpl;
   import org.xml.sax.ContentHandler;
   import org.xml.sax.SAXException;
  @@ -125,7 +126,7 @@
           if (values != null)
               validationError = definition.getDatatype().validate(values, new 
ExpressionContextImpl(this));
           else
  -            validationError = new 
ValidationError("multivaluefield.conversionfailed");
  +            validationError = new ValidationError(new 
I18nMessage("multivaluefield.conversionfailed", Constants.I18N_CATALOGUE));
   
           return validationError == null;
       }
  
  
  

Reply via email to