Hi, there are few possible solutions:
1. Pass the messages as parameter from the calling page or component to the service 2. Return only codes or something that you translate to human readable form in the page / component 3. If messages are errors, return your own exception that contains message key or code that gets translated in the UI 4. Take a look at TapestryTestCase (http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java?revision=753426) method messagesFor. Basicly you can load what ever to the MapMessages implementation (http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/internal/services/MapMessages.html) and use that OR you can load standard java ResourceBundle and wrap it with MessagesImpl (http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ioc/internal/util/MessagesImpl.html) Remember that case 4 involves using classes that are marked as internal and may change anytime. - Ville Felix Gonschorek-2 wrote: > > Hi all, > > i am trying to obtain a Messages object for localization in an service > that has > no connection to a page or component. How can i load the Application > default > Messages (app.properties) as a Messages object in my service? Searched the > source, howtos and the list and found no hint so far, any hint apreciated! > > > felix > > > > -- > Felix Gonschorek > ggmedia > > Kirchstr. 18 > 69115 Heidelberg > > Tel: +49 6221 187 44 10 > Fax: +49 6221 187 44 99 > Mobil: +49 176 2234 1338 > > fe...@ggmedia.net > http://www.ggmedia.net > > Vertretungsberechtigte Gesellschafter: > Felix Gonschorek & Jochen Greiner > > Umsatzsteuer-Identifikationsnummer > gemäß § 27a Umsatzsteuergesetz: > DE232906440 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > > -- View this message in context: http://www.nabble.com/-T5.1--Obtaining-Messages-in-Service-tp24498126p24510755.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org