Localized JSF Authentication

Is there a way to painlessly localize default authentication messages in JSF 2.0? I know this is the key, I. e., "javax.faces.component.UIInput.REQUIRED", but from all that I have found, the only way to change them is a set of messages, and it is not local, like a resource package. I also did not find a way to override the default validator for

required="true"

So, is there a way to decently localize these messages without writing a custom “mandatory” validator that uses the required set of resources? Not too much work, but I really like

required="true"

instead

<h:inputText ...
    <f:validator  ...
</h:inputText ...

just for short circuiting the code, etc. The question is generally about the default messages, although the required validator is mentioned as an example.

JSF 2.0, GFv3.1, JEE6 (Servlets 3.0, EL 2.2, EJB 3.1 .., ).

+3
1

, ? . , 2.5.2.4 JSF 2.0 <message-bundle> faces-config.xml. ResourceBundle, name_ll_CC.properties, ll - CC () .

, , Mojarra 2.0.3 ( ), -, , , , , (), . , ?

+4

Source: https://habr.com/ru/post/1787076/


All Articles