-
1. Re: Update to Seam i18n to support resource bundle types rel
smartbinary Nov 23, 2006 10:55 AM (in response to christophe.laumond)Hello,
First, note that you need to refer to the seam message component rather than the bundle name in your EL. As such,#{testBundleName.message}
would need to be#{messages.message}
Also, note that Gavin did not implement this multiple resource type support the same way I did in the sample attached to the JIRA. As Gavin notes in his solution,I made a one-word change: private -> protected on loadBundle(). You should be able to do anything you like by subclassing now.
I have not had the opportunity yet to implement the DatabaseResourceBundle support on top of this new seam support.
Regards,
Todd -
2. Re: Update to Seam i18n to support resource bundle types rel
gavin.king Nov 23, 2006 4:09 PM (in response to christophe.laumond)Right, all you need to do is this:
@Name("resourceBundle") public class DatabaseResourceBundle extends ResourceBundle { protected java.util.ResourceBundle loadResourceBundle(String name) { return ..... ; } }
Except .... I just realized that the new scanning code that went into CR1 breaks the ability to override built-in components! Which is a bad bug that I will need to fix for the GA.
http://jira.jboss.com/jira/browse/JBSEAM-293 -
3. Re: Update to Seam i18n to support resource bundle types rel
christophe.laumond Nov 23, 2006 11:41 PM (in response to christophe.laumond)Thanks to both of you for the feedback.
Is it possible to define several seam message components ?
We want to give the possibility to an administrator to change the messages in the application through a webapplication.
If there is only one seam message component, it won't be very user friendly to display a list of ALL the messages of the application.
We would like to define one set of messages per page so the user can choose a page and only the messages in this page are displayed.
This means that we need a seam message component per page.
Is there a way to do that ?
Thanks in advance for the feedback.
Regards,
Christophe -
4. Re: Update to Seam i18n to support resource bundle types rel
gavin.king Nov 24, 2006 2:27 PM (in response to christophe.laumond)Seam 1.1 lets you define keys that are scoped to a particular page in myViewId_en.properties.