When to create and use custom convertors? The main reasons behind creating our converter are : 1. When we want to convert a component's data to a type other than a standard type When we want to convert the format of the data. Read more at http://www.
Ads
Tutorials
Steps to follow :
<converter>
|
Use this converter in the view page as :
<h:inputText id="input_text">
|
<converter> <converter-for-class>Email</converter-for-class> <converter-class>EmailConverter</converter-class>
|
If we register the EmailConverter class to handle all Email objects automatically then there is no need to use the <f:converter/> tag in view page. Use this converter as :
<h:inputText id="phone" value="#{Bean.email}">
|
Posted on: February 27, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles
Advertisements
Ads
Ads
Discuss: JSF Interview Questions
Post your Comment