Example usage for org.apache.commons.validator Field getIndexedListProperty

List of usage examples for org.apache.commons.validator Field getIndexedListProperty

Introduction

In this page you can find the example usage for org.apache.commons.validator Field getIndexedListProperty.

Prototype

public String getIndexedListProperty() 

Source Link

Document

Gets the indexed property name of the field.

Usage

From source file:org.seasar.struts.lessconfig.factory.AbstractValidatorAnnotationHandler.java

protected Field createField(Field field, PropertyDesc propDesc, String depends) {
    Field newField = new Field();
    newField.setDepends(depends);//from   ww  w.  j a  v  a2  s .  c  o  m

    String property = getFieldProperty(field, propDesc);
    if (propDesc.getPropertyType().isArray()) {
        newField.setProperty("");
        newField.setIndexedListProperty(property);
    } else {
        newField.setProperty(property);
        newField.setIndexedListProperty(field.getIndexedListProperty());
    }

    return newField;
}

From source file:org.seasar.struts.lessconfig.factory.AbstractValidatorAnnotationHandler.java

protected String getFieldKey(Field field, PropertyDesc propDesc) {
    String key = getFieldProperty(field, propDesc);
    if (!StringUtil.isEmpty(field.getIndexedListProperty())) {
        key = field.getIndexedListProperty() + "[]." + key;
    }//from w  ww  . j  a v  a  2 s .  co  m
    return key;
}