WebObjects WOD binding to Properties Resource files
"George" <[email protected]> Wed, 22 Oct 2008 16:52:31 +1300
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Is there a way I can bind a declaration in my wod file directly to a
key/value pair in a WebObjects Properties resource file, rather than a value
in the related java file?
In Apache struts I would use the bean message taglib where I can specify a
resource bundle and a key in the resource bundle, and the jsp page would
resolve replacing the value for the key in the resource bundle on the html
page... In this way I do not have to put static text in my wo->html, but
stick it in a properties file I can change at run time.
For Example
MyPage.html
<webobjects name='PageStaticHeading1' />
MyPage.wod
PageStaticHeading1: WO<something like String I guess> {
resourceBundle = PropertiesPageHeadings; // specify the resource
bundle to use
resourceKey = '<mysite>.<mypage>.<myheading1>; // specify a key in the
resource bundle
}
PropertiesPageHeadings.properties_English
# my English resource bundle for static html bits
'<mysite>.<mypage>.<myheading1> = My name is George;
PropertiesPageHeadings.properties_FR
# my French resource bundle for static html bits
'<mysite>.<mypage>.<myheading1> = Je m'appelle Georges;
_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev