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:convertNumberIt is used to converts a string into a number of specific format
f:convertDateTimeIt is used to converts a string into a date of specific format
Custom ConvertorIt is used to create a custom convertor

 

Please follow and like us:
error
Posted in JSF   








Copyright © 2019 CodesJava DMCA.com Protection Status