|
back
Create and Register a Custom Validator
- In the Project Explorer view open faces-config.xml and select Tree tab.
- Select Validators and click on Add button.
- Type the name of your validator in the Valifator-id field and name the class for validators.
After clicking Finish button your custom validator is registered under entered name.
- Let's create validator class. In the Validator section you should see your Validator-id
and Validator-class. Click on Validator-class to generate the source code.
- Java class will be created automatically. Leave everything without changes and click Finish.
- To open validator class click again on Validator-class in the Validator section. Now you are able
to write business logic of validator.
back
|