|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.applications.editwizard.Validator
public class Validator
This class validates pre-html documents for the EditWizard. It is mainly used to register invalid form and fields.
| Constructor Summary | |
|---|---|
Validator()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Validator()
| Method Detail |
|---|
public static boolean validate(Document prehtml,
Document schema)
prehtml - the prehtml which should be validatedschema - the wizardschema which is needed to validate at all
public 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 wizardschema
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||