Basic Customization > User Interface Customization > Customizing HTML Clients Using the Windchill JSP Framework > Adding Validation Logic for Actions and Properties > Implementation > Overview
  
Overview
It is probably helpful to begin with a definition of the term validation. For the purposes of this discussion, the term validation refers to activities performed to determine what a user can see or do. For example:
Should we display the “Create Part” action?
Should we allow the checkout of this object?
Is everything the user entered in this create wizard OK?
For the purposes of our discussion, validation can be broken down into three broad categories:
Pre-Validation
Attempts to answer the questions: “Should something appear to the user in the UI? And, if so, should it be editable/selectable?”
For example, Should we display and enable the “Create Part” action for user A in container B?
Pre-Validation can be performed for actions or other UI components (status glyphs, attributes, tables, etc.)
Post-Select Validation
Attempts to answer the question: “Should the operation that was just selected in the UI be allowed to proceed?”
For example, Can we allow the checkout of parts A, B, and C?
Post-Submit Validation
Attempts to answer the question: “is the data the user just entered valid?”
For example, When the user clicks ‘Next’ in the “Create Part” wizard, are we going to let them go to the next step, or do they need to modify some data (e.g., name, number) in the current step?
The UI Component (Action) Validation Service exposes one or more APIs for each of the types of validation listed above.
From a high level, a common component or some other client invokes a validation API on the Validation Service, passing one or more validation keys (which can be thought of as an action name, like create, for instance) and a UIValidationCriteria bean, which contains data known by the client that is required to perform validation. The Validation Service uses the validation key(s) to perform a lookup and identify the Validator class(es) that should be called to carry out the validation activity. The service then passes the key and UIValidationCriteria on to the identified Validator(s) and awaits a (set of) result(s). When the service has the result(s) from the Validator(s), it (creates a bundle of results and) returns it to the client.
This documentation will concentrate on the authoring of Validator classes and methods.