[JBoss JIRA] Created: (JBSEAM-374) Normalize the event model
by Gavin King (JIRA)
Normalize the event model
-------------------------
Key: JBSEAM-374
URL: http://jira.jboss.com/jira/browse/JBSEAM-374
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Gavin King
Assigned To: Gavin King
Fix For: 1.1
Currently some events can be handled by either an @Observer method, or a method binding in events.xml. Ideally we would like this to be true for ALL events, but for now our integration with JSF and jBPM is not quite that deep. Nevertheless, there are some things we could do to allow a more consistent model where everything can be handled by either a method binding or an annotated method:
(1) Rebuild the page actions functionality on top of the Seam event bus - defining standard org.jboss.seam.page.<viewId> events that can be handled via @Observer("org.jboss.seam.page./myViewId.xhtml")
(2) Introduce "outcome observers" for JSF: if I have <h:commandButton action="myOutcome"/>, allow us to handle it using @Observer("org.jboss.seam.outcome.myOutcome")
(3) Ditto for jBPM: if I have <transition name="myTransition" ... />, allow us to handle it using @Observer("org.jboss.seam.transition.myTransition")
(4) Finally, introduce annotations layered over @Observer: @RenderPage("/myViewId.xhtml"), @Outcome("myOutcome"), @Transition("myTransition")
--
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
18 years, 2 months
[JBoss JIRA] Created: (JBSEAM-421) Update to Seam i18n to support DatabaseResourceBundle
by Todd Smart (JIRA)
Update to Seam i18n to support DatabaseResourceBundle
-----------------------------------------------------
Key: JBSEAM-421
URL: http://jira.jboss.com/jira/browse/JBSEAM-421
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 1.1
Reporter: Todd Smart
Fix For: 1.1
The current Seam i18n ResourceBundle class only supports loading java.util.ResourceBundle resource bundles. For ref, the loadBundle() method is:
{code}
private void loadBundle()
{
try
{
bundle = java.util.ResourceBundle.getBundle(
bundleName,
Locale.instance(),
Thread.currentThread().getContextClassLoader()
);
log.debug("loaded resource bundle: " + bundleName);
}
catch (MissingResourceException mre)
{
log.debug("resource bundle missing: " + bundleName);
}
}
{code}
I've updated the org.seam.core.ResourceBundle class to plug into the org.sadun.util.DatabaseResourceBundle ... providing for a very flexible, db-driven i18n system.
The only change required (for the prototype code!) to get this to work was an update to the Seam ResourceBundle was:
{code}
private void loadBundle() {
try {
DatabaseResourceBundle databaseResourceBundle = new DatabaseResourceBundle(jdbcUrl, bundleName, Locale.instance());
bundle = databaseResourceBundle;
log.debug("loaded resource bundle: " + bundleName);
} catch (MissingResourceException mre) {
log.debug("resource bundle missing: " + bundleName);
}
}
{code}
Beyond the prototype, of course, this will be cleaned up. I'm thinking others may benefit from updating this Seam class to allow for supporting other types of resource bundle repositories.
Feature Request:
------------------------
1) Add an attribute to ResourceBundle called: resourceType (thus allowing a class to be called to load a bundle). This attribute would be configured in seam.properties.
2) Update the loadBundle() method such that if resourceType is not null, to get an instance of ResourceType.instance() followed by a call to resourceType.loadBundle() method
I don't mind contributing the code ... just testing the waters first.
Regards,
Todd Smart
todd.smart(a)smartbinary.com
--
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
18 years, 2 months