-
1. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Jun 22, 2006 5:22 PM (in response to liudan2005)Yes you can set the key org.jboss.seam.NoConversation in your resource bundle (messages.properties).
-
2. Re: specify a face message for @Conversational ifNotBegunOut
liudan2005 Jun 22, 2006 6:04 PM (in response to liudan2005)Great! It works now. Thanks Gavin.
-
3. Re: specify a face message for @Conversational ifNotBegunOut
iradix Oct 25, 2006 4:34 PM (in response to liudan2005)What if one wanted to use a different message depending on the circumstances? It seems like it would be nice to be able to define a key besides org.jboss.seam.NoConversation in the pages.xml file along with no-conversation-view-id.
-
4. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Oct 25, 2006 4:40 PM (in response to liudan2005)Sorry? Depending upon what?
-
5. Re: specify a face message for @Conversational ifNotBegunOut
iradix Oct 25, 2006 5:01 PM (in response to liudan2005)That was a bit vague I guess. Depending on what part of the application is being accessed. In other words, something like "No Conversation" or "Operation timed out" are fine for areas where the users are familiar with the application (administrators perhaps) but other areas might require a bit more detail. If I had a conversational search page for instance (which I do) where the user pairs down results, if that times out I'd like to provide some additional information. Something like "We're sorry, but your search is no longer active, please begin again" seems more appropriate to me for people who may not be very computer savvy and therefore might be put off if they get a confusing error message. I don't think that's something I could do right now.
-
6. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Oct 25, 2006 5:06 PM (in response to liudan2005)OK, I'll make a protected method on Manager that you can override and do whatever you like ;-)
-
7. Re: specify a face message for @Conversational ifNotBegunOut
iradix Oct 25, 2006 5:13 PM (in response to liudan2005)I could work with it, although I'm not sure how to set a different Manager implementation. Just a thought though, how about the ability to define a resource bundle in pages.xml that would be used by the resourceBundle component to override the default values? Something like that could be useful.
-
8. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Oct 25, 2006 5:24 PM (in response to liudan2005)You set a different Manager implementation like so:
@Name("org.jboss.seam.core.manager") public class MyManager extends Manager { //do anything you like }
I have considered allowing page-scoped resource bundles, for other reasons, and we may well do this at some stage. -
9. Re: specify a face message for @Conversational ifNotBegunOut
iradix Oct 25, 2006 5:30 PM (in response to liudan2005)Thanks. That'll be helpful.
The resource bundle change is something that I could use now. If you want to discuss possible implementations I might be able to contribute it over the next month or so. -
10. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Oct 30, 2006 8:25 PM (in response to liudan2005)Well, the way I would implement this would be for the Page object held by Pages to hold a java.util.ResourceBundle, and have the Seam ResourceBundle check there before looking in the global resource bundle. We should also have a defaulting rule, so that by default we would look in, eg. WEB-INF/classes/messages_myViewId_en.properties, even if nothing is specified in pages.xml.
-
11. Re: specify a face message for @Conversational ifNotBegunOut
gavin.king Oct 30, 2006 9:22 PM (in response to liudan2005)I have implemented this in CVS.
-
12. Re: specify a face message for @Conversational ifNotBegunOut
iradix Oct 31, 2006 11:21 AM (in response to liudan2005)Thanks Gavin. That's exactly what I had in mind myself.