You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-dev@incubator.apache.org by Martin Koci <Ma...@aura.cz> on 2006/09/29 14:50:17 UTC

Allow redefine localised messages

Messages (for example key UIXEditableValue.REQUIRED) are seeking in
org.apache.myfaces.trinidad.resource.MessageBundle and in
javax.faces.Messages. 

They should be picked from message bundle of running JSF app too to
allow redefine them.  JSF spec 2.5.2.4 Localized Application Messages
says:

The following algorithm must be used to create a FacesMessage instance
given a message
key.

- Call getMessageBundle() on the Application instance for this web
application, to determine if the application has defined a resource
bundle name. 

- If so, load that ResourceBundle and look for the message there. If not
there, look in the javax.faces.Messages resource bundle.

- In either case, if a message is found, use the above conventions to
create a FacesMessage instance.

I idea above is correct, I would file JIRA issue and try to provide a
patch for this.


Martin



Re: Allow redefine localised messages

Posted by Adam Winer <aw...@gmail.com>.
Well, strictly speaking, the behavior you list here is required for
spec components - not third-party components.   So, for one,
we definitely should not look in javax.faces.Messages.  We
probably should be looking in Application.getMessageBundle().

-- Adam



On 9/29/06, Martin Koci <Ma...@aura.cz> wrote:
> Messages (for example key UIXEditableValue.REQUIRED) are seeking in
> org.apache.myfaces.trinidad.resource.MessageBundle and in
> javax.faces.Messages.
>
> They should be picked from message bundle of running JSF app too to
> allow redefine them.  JSF spec 2.5.2.4 Localized Application Messages
> says:
>
> The following algorithm must be used to create a FacesMessage instance
> given a message
> key.
>
> - Call getMessageBundle() on the Application instance for this web
> application, to determine if the application has defined a resource
> bundle name.
>
> - If so, load that ResourceBundle and look for the message there. If not
> there, look in the javax.faces.Messages resource bundle.
>
> - In either case, if a message is found, use the above conventions to
> create a FacesMessage instance.
>
> I idea above is correct, I would file JIRA issue and try to provide a
> patch for this.
>
>
> Martin
>
>
>