JSF Tutorial - JSF Convertor Tags








JSF has convertors to convert its UI component's data to object used in a managed bean and vice versa.

For example, we can convert a text into date object and can validate the format of input as well.

To use the converter tag, we have to use the following namespaces of URI in html node.

<html 
   xmlns="http://www.w3.org/1999/xhtml" 
   xmlns:f="http://java.sun.com/jsf/core"  
>

Converter Tags

Following are important Convertor Tags in JSF 2.0:

TagDescription
f:convertNumberConverts a String into a Number of desired format
f:convertDateTimeConverts a String into a Date of desired format
Custom ConvertorCreating a custom convertor