commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14023] New: - support for indexed field validation
Date Mon, 28 Oct 2002 20:17:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14023>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14023

support for indexed field validation

           Summary: support for indexed field validation
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: padma.ginnaram@s1.com


Validation framework supports nested indexed field validation but not 
validating indexed fields on the form. This does not allow me to have a list of 
strings on my form unless I use another bean to hold it. Here are some minor 
changes to validator classes to allow this functionality by supplying an empty 
or no property field.

<field property="" indexedProperty="referenceNumber"
                indexedListProperty="referenceNumbers"
                depends="integer,integerRange".......

Changes to Form.addField

    /**
     * Add a <code>Field</code> to the <code>Form</code>.
    */
    public void addField(Field f) {
       if (f != null ) {
          String key = f.getProperty().trim();
          if ((key==null) || (key.length()== 0)) {
            if (f.isIndexed())
              key = f.indexedListProperty;
            else
              return;
          }
       	  lFields.add(f);
          hFields.put(key, f);
        }
    }

Changes to Field.generateKey()

/**
     * Generate correct <code>key</code> value.
    */
    public void generateKey() {
       if (isIndexed()) {
          if ((property != null) && (property.length() >0))
            key = indexedListProperty + TOKEN_INDEXED + "." + property;
          else
            key = indexedListProperty + TOKEN_INDEXED ;
       } else {
          key = property;
       }
    }

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message