You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/10/28 21:17:51 UTC
DO NOT REPLY [Bug 14023] New: -
support for indexed field validation
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>