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