Re: BestPractice - working with Wicket properites outside of Wicket context
Sometimes it's just that easy. Works like a charm! Never used it before. Thanks! 2011/3/21 vineet semwal vineetsemwal1...@gmail.com: simply use resource bundle? ResourceBundle.getBundle(DomainObjectA.class.getCanonicalName()).getString(key); On Mon, Mar 21, 2011 at 9:36 PM, Reinhard Vornholt reinhard.vornh...@gmail.com wrote: Hello group, can anybody point me in the right direction for the following problem. We are working on a project based on wicket 1.4.x (also hibernate, spring and so on) We are using property files for localized text. Mostly side by side with the domain objects, like so: DomainObjectA.class DomainObjectA.properties inside of DomainObjectA.properties we have attributeName.label=Intelligent Name attributeName.tooltip=some usefull information So far so good, everything works fine. But know we want to produce some PDF documents. We are using iText to generate those documents. The PDF document is a representation of a couple of pages. I would like to use the same labels already stored in the properties files. But I have no idea how to access them from my iText generating classes. I have the domain objects inside the pdf generating context, but no Application or component hierarchy or something like that. Can anyone please point me in a good direction, or (even better) provide me with a working example of a solution? Any help is greatly appreciated. Reinhard. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: BestPractice - working with Wicket properites outside of Wicket context
simply use resource bundle? ResourceBundle.getBundle(DomainObjectA.class.getCanonicalName()).getString(key); On Mon, Mar 21, 2011 at 9:36 PM, Reinhard Vornholt reinhard.vornh...@gmail.com wrote: Hello group, can anybody point me in the right direction for the following problem. We are working on a project based on wicket 1.4.x (also hibernate, spring and so on) We are using property files for localized text. Mostly side by side with the domain objects, like so: DomainObjectA.class DomainObjectA.properties inside of DomainObjectA.properties we have attributeName.label=Intelligent Name attributeName.tooltip=some usefull information So far so good, everything works fine. But know we want to produce some PDF documents. We are using iText to generate those documents. The PDF document is a representation of a couple of pages. I would like to use the same labels already stored in the properties files. But I have no idea how to access them from my iText generating classes. I have the domain objects inside the pdf generating context, but no Application or component hierarchy or something like that. Can anyone please point me in a good direction, or (even better) provide me with a working example of a solution? Any help is greatly appreciated. Reinhard. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: BestPractice - working with Wicket properites outside of Wicket context
sorry a correction , DomainObjectA.class.getName() instead of canonical name because you can have property files for inner classes too in that case canonical name will fail.. On Mon, Mar 21, 2011 at 11:52 PM, vineet semwal vineetsemwal1...@gmail.com wrote: simply use resource bundle? ResourceBundle.getBundle(DomainObjectA.class.getCanonicalName()).getString(key); On Mon, Mar 21, 2011 at 9:36 PM, Reinhard Vornholt reinhard.vornh...@gmail.com wrote: Hello group, can anybody point me in the right direction for the following problem. We are working on a project based on wicket 1.4.x (also hibernate, spring and so on) We are using property files for localized text. Mostly side by side with the domain objects, like so: DomainObjectA.class DomainObjectA.properties inside of DomainObjectA.properties we have attributeName.label=Intelligent Name attributeName.tooltip=some usefull information So far so good, everything works fine. But know we want to produce some PDF documents. We are using iText to generate those documents. The PDF document is a representation of a couple of pages. I would like to use the same labels already stored in the properties files. But I have no idea how to access them from my iText generating classes. I have the domain objects inside the pdf generating context, but no Application or component hierarchy or something like that. Can anyone please point me in a good direction, or (even better) provide me with a working example of a solution? Any help is greatly appreciated. Reinhard. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- thank you, regards, Vineet Semwal -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org