CodesJava

Easy learning with example program codes

JSF converter tags tutorial


What is a converter?

In programming converter is used to transform the component data from strings to Java objects and vice versa.

JSF converter tags:

JSF provides inbuilt converters to transform the UI component data from strings to Java objects used in a managed bean and vice versa. For example a date object is represented by a text string on web form which can be converted back to the date object by using converters.

For using JSF converter tags 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"  
>

Commonly used JSF converter tags:

Tag Description
f:convertNumber It is used to converts a string into a number of specific format
f:convertDateTime It is used to converts a string into a date of specific format
Custom Convertor It is used to create a custom convertor

 



Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap