• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebObjects WOD binding to Properties Resource files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebObjects WOD binding to Properties Resource files


  • Subject: WebObjects WOD binding to Properties Resource files
  • From: "George" <email@hidden>
  • Date: Wed, 22 Oct 2008 17:24:11 +1300

Question

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? I want to externalise the majority of my HTML text [heading’s etc] without creating a java WOString/binding for each heading and bit of static text in my html file.

 

Background

In Apache struts I would use the bean message taglib where I can specify a resource bundle and a resource key. When the page is resolved the value for the key in the resource bundle will be displayed [on the html page]. In this way I can externalise the majority of my html text to Resource files [Properties], and change them without re-deploying applications etc.  

 

An Example

MyPage.html

<!--  My declaration for a static html string  ->

<webobjects name=’PageStaticHeading1’ />

 

MyPage.wod

// the WO declaration that will bind to key/value in a Properties file

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;

 

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: WebObjects WOD binding to Properties Resource files
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: WO 5.4.3 from 5.3.3 --> things to look out for?
  • Next by Date: Re: WYSIWYG editors
  • Previous by thread: Re: WO 5.4.3 from 5.3.3 --> things to look out for?
  • Next by thread: Re: WebObjects WOD binding to Properties Resource files
  • Index(es):
    • Date
    • Thread