[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1366) SeamApplicationMessageBundle doesn't follow ResourceBundle contract

Michael Youngstrom (JIRA) jira-events at lists.jboss.org
Tue May 29 21:29:08 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1366?page=all ]

Michael Youngstrom updated JBSEAM-1366:
---------------------------------------

    Description: 
SeamApplicationMessageBundle is backed by the Messages component.  This is fine except if a key that does not exist is specified then Messages will return the key as the value.  This works great for Messages but it can cause problems for SeamApplicationMessageBundle.  Many existing JSF components have an algorithm similar to the following to display messages and other component text:

1. Get faces-config specified MessageBundle
2. Try to get a value from the resource bundle specified as the MessageBundle
3. Catch MissingResourceException if not found
4. Try component built in resource bundle for default message.

Since SeamApplication returns "org.jboss.seam.jsf.SeamApplicationMessageBundle" by default if there is no user specified message-bundle in the faces-config this could cause some problems since a component's default message will never be shown under the scenario above.

This possible problem could be solved if SeamApplicationMessageBundle were to throw a MissingResourceException if the key is not found in Messages.

Mike

  was:
SeamApplicationMessageBundle is backed by the Messages component.  This is fine except if a that does not exist is specified then Messages will return the key as the value.  This works great for Messages but it can cause problems for SeamApplicationMessageBundle.  Many existing JSF components have an algorithm similar to this to display messages and other component text:

1. Get faces-config specified bunleName
2. Try to get value from resource bundle of specified bundleName
3. Catch MissingResourceException
4. Try component built in resource bundle for default message.

Since SeamApplication returns "org.jboss.seam.jsf.SeamApplicationMessageBundle" by default if there is no user specified message-bundle in the faces-config this could cause some problems.

Is it possible for SeamApplicationMessageBundle to throw MissingResourceException if the key is not found in Messages instead of simply returning what Messages returns which is the key itself?

Mike


> SeamApplicationMessageBundle doesn't follow ResourceBundle contract
> -------------------------------------------------------------------
>
>                 Key: JBSEAM-1366
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1366
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.3.0.ALPHA
>            Reporter: Michael Youngstrom
>             Fix For: 1.3.0.ALPHA
>
>
> SeamApplicationMessageBundle is backed by the Messages component.  This is fine except if a key that does not exist is specified then Messages will return the key as the value.  This works great for Messages but it can cause problems for SeamApplicationMessageBundle.  Many existing JSF components have an algorithm similar to the following to display messages and other component text:
> 1. Get faces-config specified MessageBundle
> 2. Try to get a value from the resource bundle specified as the MessageBundle
> 3. Catch MissingResourceException if not found
> 4. Try component built in resource bundle for default message.
> Since SeamApplication returns "org.jboss.seam.jsf.SeamApplicationMessageBundle" by default if there is no user specified message-bundle in the faces-config this could cause some problems since a component's default message will never be shown under the scenario above.
> This possible problem could be solved if SeamApplicationMessageBundle were to throw a MissingResourceException if the key is not found in Messages.
> Mike

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list