Using the Struts Validator Framework Editor

To organize the myriad of potential configuration files which make up the Struts Validator framework, including form validations and field validators, Workshop 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

To edit a form validation in the Struts Validator Framework editor

  1. In the AppXplorer view, expand the nodes Web App Root > Struts Configuration > Modules. Expand the appropriate module and select Validation Forms.

    val
  2. Expand the Validation Forms branch to view the current form validations.
  3. Double-click on a form validation to open the Struts Validator Framework editor. The specific form validation properties will open for editing.
  4. Expand the form to view and edit the specific field validation settings.

    valfield
  5. To add additional checks to a field, select the field and click the Edit Field Validators link.

To add a new form validation

  1. In the AppXplorer view, expand the nodes Web App Root > 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.

To edit a field validator in the Struts Validation Framework editor

  1. In the AppXplorer view, expand the nodes Web App Root > Struts Configuration > Modules. Expand the appropriate module and locate 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 field validator

  1. In the AppXplorer view, expand the nodes Web App Root > Struts Configuration > Modules. Expand the appropriate module and locate 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.

Still need help? Post a question on the Workshop newsgroup.