Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-26 Thread Inge Solvoll
Same problem with RequestGlobals. Comes up as null when I inject it. Haven't tried the ApplicationStateManager yet, but in my head, the suggested code sounds like the equivalent of the @Application state annotation, which I already tried. Am I wrong? On Mon, Aug 25, 2008 at 11:40 PM, Inge

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-26 Thread Hannes Heijkenskjöld
It has been a while since I worked with that code, so I don't remember the exact reason. But when customizing some parts of tapestry it seems that ordinary injects don't work. We did manual injects, by providing getters and setters and doing this in the AppModule: // Method for instantiating

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-26 Thread Inge Solvoll
Ahhh!! That was the missing part. Thank you so much, Hannes, I could never have figured this out myself. I still don't fully understand the code I just wrote :) I nice little bridge between tapestry and my custom messages system though! Inge On Tue, Aug 26, 2008 at 9:04 AM, Hannes Heijkenskjöld

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-25 Thread Inge Solvoll
Hi, Hannes! I tried your implementation, and it worked right away, I just returned the value TESTING TESTING from my DbMessages class that extends Abstract Messages. But, what I need is for the valueForKey(String key) method to be aware of the languageId/customerId of the currently logged in

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-25 Thread Hannes Heijkenskjöld
Hi Inge, glad to have been able to help you! For your current problem, I can see two immediate solutions. 1. Store your user object as an ASO and inject ApplicationStateManager into your Messages implementation. Get the user object instance by calling

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-08-25 Thread Inge Solvoll
Ok, thanks, I'll try that! I already tried the following in my class that extends AbstractMessages: @Inject private HttpServletRequest request; @ApplicationState private User user; Which didn't work, both were null. But what your saying is that these objects are not possible to inject in this

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-04-16 Thread Michael Capper
commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5-%3A-Expanding-Messages-Catalog-for-localization-from-arbitrary-source-tp16608683p16718330.html Sent from the Tapestry - User mailing list archive at Nabble.com

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-04-16 Thread Hannes Heijkenskjöld
Great! Glad I could help you. :-) /Hannes Michael Capper skrev: Thanks Hannes! I tried the route with the Decorator once, and ended up having to write some java-code into the interceptor via the BodyBuilder 'twas not nice. Your example worked great, i only had to pass some more

T5 : Expanding Messages Catalog for localization from arbitrary source

2008-04-10 Thread Michael Capper
/component or use the 'message:' binding, the extra localization is available at a root level. Thanks for any help or pointers, Mike -- View this message in context: http://www.nabble.com/T5-%3A-Expanding-Messages-Catalog-for-localization-from-arbitrary-source-tp16608683p16608683.html Sent from

Re: T5 : Expanding Messages Catalog for localization from arbitrary source

2008-04-10 Thread Hannes Heijkenskjöld
Hi I have recently wondered about the same, and have now built something that after much trial and error now works. Basically, I have created a Messages implementation that wraps both a tapestry Messages object and our own database messages. If a message is not found in our database, the