public class Validator extends Object
| Constructor and Description |
|---|
Validator() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addValidationError(Node validationnode,
int errortype,
String errormsg)
This method adds a validation error to the form.
|
static void |
createStepsOverview(Document prehtml,
Document schema)
Constructs an overview-node in the pre-html where all steps are described.
|
static boolean |
validate(Document prehtml,
Document schema)
Validates the given prehtml-xml.
|
static boolean |
validateField(Node field)
This method validates one field.
|
static int |
validateForm(Node form)
This method can validate one form.
|
public static boolean validate(Document prehtml, Document schema)
prehtml - the prehtml which should be validatedschema - the wizardschema which is needed to validate at allpublic static int validateForm(Node form)
form - The form to be validated.public static boolean validateField(Node field)
field - the field which should be validated.public static void addValidationError(Node validationnode, int errortype, String errormsg)
validationnode - this node was validatederrortype - what kind of error was it?errormsg - what errormessage should be placed.public static void createStepsOverview(Document prehtml, Document schema)
<steps-validator valid="false" allowsave="false" allowcancel="true">
<step form-schema="schema-id" valid="true" />
<step form-schema="schema-id" valid="false" />
</steps-validator>
THis method creates a steps-overview which can be used by the html to show what forms are valid and what are not.prehtml - the prehtml data nodeschema - the original wizardschemaMMBase 1.9-SNAPSHOT - ${javadoctimestamp}