/** * Does the current input set define the named field? * and is valid for the specified document type * Scan through every field in every page of the input set * * @param fieldName field name * @param documentType doc type * @return true if the current set has the named field */ public boolean isFieldPresent(String fieldName, String documentType) { if (documentType == null) { documentType = ""; } for (int i = 0; i < inputs.length; i++) { for (int j = 0; j < inputs[i].length; j++) { DCInput field = inputs[i][j]; String fullName = field.getFieldName(); if (fullName.equals(fieldName)) { if (field.isAllowedFor(documentType)) { return true; } } } } return false; }