Previous Next vertical dots separating previous/next from contents/index/pdf

Using the Struts Validator Framework

To organize the myriad of potential configuration files which make up the Struts Validator framework, including form validations and field validators, Workshop Studio and Workshop for Struts provide the Validator Framework editor. The Validator Framework editor allows for the creation, modification, and synchronization of all validation resources through a single interface. As new validations are added to the application through the Validation Framework Wizard, all of the changes propagate to the appropriate configuration files.

Editing validation forms and field validators

  1. To edit a form validation in the Struts Validator Framework editor
    1. In AppXplorer, expand the Web App Root and navigate to Struts Configuration | Modules. Expand the appropriate module and select Validation Forms.
    2. Expand the Validation Forms branch to view the current form validations.
    3. Double-click on a form validation to open the Stuts Validator Framework editor.
    4. The specific form validation properties will open for editing. Expand the form validation to view and edit the specific field validation settings. To add additional checks to a field, select the field and click the Edit Field Validators link.
  2. To edit a field validator in the Struts Validation Framework editor
    1. In AppXplorer, expand the Web App Root and navigate to Struts Configuration | Modules. Expand the appropriate module and select Validators.
    2. Double-click on a validator to open the Struts Validator Framework editor.
    3. The specific field validator properties will open for editing.

Adding a new form validation

  1. To add a new form validation
    1. In AppXplorer, expand the Web App Root and navigate to Struts Configuration | Modules. Expand the appropriate module and select Validation Forms.
    2. Right click Validation Forms and select New Validation Form.
    3. The Insert Form Validation wizard will launch and provide step by step instructions to create a new form validation and select and configure field validators. The new form validation will appear in the validation xml source as well as in the Struts Validator Framework editor.

Adding a new field validator

  1. To add a new validator
    1. In AppXplorer, expand the Web App Root and navigate to Struts Configuration | Modules. Expand the appropriate module and select Validators.
    2. Right click Validators and select New Validator.
    3. Enter the Validator name, properties, and/or a new Java Script function to the Validator Tag dialog. The new field validator will be added to the list of field validators in the Validators tab of the Validator Framework editor and the appropriate configuration files will be updated with the validator properties.

Related concepts

Struts
Struts Configuration

Related tasks
Adding global and local exceptions
Adding global and local forwards
Navigating with the Struts outline view
Working with Struts applications

Related reference

Insert Action Mapping
Struts User Guide

 

Skip navigation bar   Back to Top