[JBoss JIRA] Created: (SEAMFACES-122) Find a way to use the @ViewConfig enums to provide yype-safe navigation rules
by Brian Leathem (JIRA)
Find a way to use the @ViewConfig enums to provide yype-safe navigation rules
-----------------------------------------------------------------------------
Key: SEAMFACES-122
URL: https://issues.jboss.org/browse/SEAMFACES-122
Project: Seam Faces
Issue Type: Feature Request
Components: View Configuration
Reporter: Brian Leathem
Fix For: 3.0.1
Option 1) instead of using a @ViewPattern annotation, instead pass it to the constructor of the enum, to be stored as a property of the enum.
Problem: the application developer would have to implement the constructor
Option 2) require the developer to implement an interfaces, that specifies a setViewId method for an enum value, programmatically set that viewId with what is in the @ViewPattern annotation
Feel free to provide more implementation options in the comments!
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] Created: (SEAMINTL-44) BundleTemplateMessage breaks with non-String ResourceBundles
by Nicklas Karlsson (JIRA)
BundleTemplateMessage breaks with non-String ResourceBundles
------------------------------------------------------------
Key: SEAMINTL-44
URL: https://issues.jboss.org/browse/SEAMINTL-44
Project: Seam International
Issue Type: Bug
Components: Messages
Affects Versions: 3.0.0.Final
Reporter: Nicklas Karlsson
Assignee: Ken Finnigan
BundleTemplateMessages has in build()
{code}
try {
text = bundles.get(clientLocale, textKey.getBundle()).getString(textKey.getKey());
} catch (Exception e) {
log.warn("Could not load bundle: " + textKey);
text = textDefault;
}
{code}
which will result in a ClassCastException if the resource is non-string (because ResourceBundle.getString implementation casts getObject to String) and is further translated to a "Could not load bundle" warning followed by the BundleKey being outputted.
Since ResourceBundle.getString is final, there is no way of overloading this behaviour. Using toString on a non-null resource would give some flexibility to this, perhaps.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months