Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Daniel Alonso Sanchez
heck it when i arrive at home. -- View this message in context: http://www.nabble.com/-t5--Use-messages-from-app.properties-in-java-classes-tp19085534p19086722.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Sven Homburg
> > > > > Thanks, Sven. I think that is my problem. I inject the Resource in a class > that is not a page, nor a component or mixin. Maybe is that, isn't it? > > Now the key is how i can do what i need... I will give a hard thought. > > Thanks a lot > > -- > Vie

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Daniel Alonso Sanchez
TECTED] > > > Thanks, Sven. I think that is my problem. I inject the Resource in a class that is not a page, nor a component or mixin. Maybe is that, isn't it? Now the key is how i can do what i need... I will give a hard thought. Thanks a lot -- View this mess

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Sven Homburg
>Basicly in all your applications classes that get "enhanced" by Tapestry IOC. thats not right the @Inject annotation only works in components, pages and mixins 2008/8/21 Andy Pahne <[EMAIL PROTECTED]> > > Thanks a lot for your response, but the problem still remains :-((. I have >> insert this

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Andy Pahne
Thanks a lot for your response, but the problem still remains :-((. I have insert this code - @Inject private ComponentResources resources; and - resources.getMessages().get("hibernateexception"); but i get a null value for "resources" obje

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Sven Homburg
; - > > The thing is that property Messages (org.apache.tapestry5.ioc.Messages), is > null, and i can't get any message from it. I know that i missing something, > but i don't know what it is :confused: > > May anyone help me again? Thanks in advance

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Daniel Alonso Sanchez
- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Thanks a lot for your response, but the problem still remains :-((. I have insert this code - @Inject private ComponentResources resources;

Re: [t5] Use messages from app.properties in java classes

2008-08-21 Thread Andy Pahne
First of all you inject ComponentResources: @Inject private ComponentResources resources; Then, you can do this: String message = resources.getMessages().get("some-message"); I am not aware if you can inject Messages directly, but I would not be surprised if you could somehow.

[t5] Use messages from app.properties in java classes

2008-08-21 Thread Daniel Alonso Sanchez
s), is null, and i can't get any message from it. I know that i missing something, but i don't know what it is :confused: May anyone help me again? Thanks in advance for it -- View this message in context: http://www.nabble.com/-t5--Use-messages-from-app.properties-in-java-classes-