JSF Encoding Component

See Also

This advanced component is useful for dynamically setting the locale for a page in your application. By default, the component picks up the encoding from your application bean. If you add the component to your application, you can see that its value property is bound by default to the application bean's localeCharacterEncoding property. For example:

   #{ApplicationBean1.localeCharacterEncoding}

The default behavior of the localeCharacterEncoding property in the standard ApplicationBean1 class is as follows:

  1. If the locale for this request is Simplified Chinese (zh_CN), return GB2312.
  2. Otherwise, return UTF-8.

You can customize this behavior by providing your own getLocaleCharacterEncoding method in the application bean.

See Also
About Components

Legal Notices