code: public String buildMaxLen() {
  		List<Criterion> criteria = this.getCriteria();
  		if (criteria != null) {
  			for (Criterion criterion : criteria) {
  				if (criterion instanceof MaxLength) {
  					return AttributeUtils.buildSingleAttribute("maxlength", Integer.toString(((MaxLength) criterion).getMaxLength()));
  				}
  			}
  		}
  		return "";
  	}
docs: builds the maxlen attribute