"jsf 2 default datetime converter pattern" Code Answer


just extend the datetimeconverter class behind <f:convertdatetime> and set the defaults in the constructor.

public class defaultdateconverter extends datetimeconverter {

    public defaultdateconverter() {
        setpattern("mm/dd/yyyy h:mm a");


use it as <f:converter converterid="defaultdateconverter" />

please note that i omitted other attributes as they are ignored anyway when pattern is specified.

By Cory McCarty on September 3 2022

Answers related to “jsf 2 default datetime converter pattern”

Only authorized users can answer the Search term. Please sign in first, or register a free account.