JSF Tip #48 - Use a custom packaged converter

In the previous blog entry we touched upon packaging a custom converter. Now we'll describe what you need to do to use it.

Add the maven dependency to your project.


And use it.

    <?xml version='1.0' encoding='UTF-8'?>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml"
            <title>Custom Converter - f:converter tag</title>
            <h2>Custom Converter - f:converter tag</h2>
                Below you will see a string that was generated using a custom converter
                named 'customConverterId'. See the sources for the source for this
            <h:outputText value="#{customConverterBean.custom}">
                <f:converter converterId="customConverterId"/>

Posted November 26, 2013