• 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
Re: custom display for WOToManyRelationship destinationDisplayKey
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom display for WOToManyRelationship destinationDisplayKey


  • Subject: Re: custom display for WOToManyRelationship destinationDisplayKey
  • From: Dev WO <email@hidden>
  • Date: Wed, 30 Aug 2006 08:27:18 +0200

Hello Fabian,

Hi Xavier,

So I tried WOApplication.application().resourceManager ().stringForKey(anAttributeOfTheEntity, "NameOfTheStringFile", null, null, null)
but even if it compiles fine, I just get "null" when the values are displayed in the page.
So I'm assuming WOResourceManger isn't suppose to work in a Framework...but I may be wrong.


Later I'll also need to pass a value for the available language, and I'm not sure on how to "bind" that in the WOToManyRelationship..

So my second guess was to create the method that got to the .string file directly inside my component.java file.
But this time I don't know what to put for "anAttributeOfTheEntity" in stringForKey(anAttributeOfTheEntity, "NameOfTheStringFile", null, null, null)


I really don't know how to do this:(

Well, maybe I don't get your question, but the documentation reads:

public String stringForKey(String aKey,
                           String aTableName,
                           String aDefaultValue,
                           String aFrameworkName,
                           NSArray aLanguagesList)

aKey - attribute in the receiver's request
aTableName - the string table
aDefaultValue - returned when no value is found
aFrameworkName - name of the framework in which the resource resides
aLanguagesList - list of languages in specific order
Returns:
a localized string from the string table aTableName

<http://developer.apple.com/documentation/Webobjects/Reference/API/ com/webobjects/appserver/WOResourceManager.html#stringForKey (java.lang.String, java.lang.String, java.lang.String,% 20java.lang.String, com.webobjects.foundation.NSArray)>

Yes, and if aLanguagesList is null, it will pick up the available key anyway. So this is correct and work as expected in my application, but when I try to use it in a framework, it seems like it doesn't get any value:(

If localization is somewhat important to you, you should look at ERXLocalizer and ERXLocalizedString in WOnder: <http:// www.mdimension.com/~wonder/api/er/extensions/ERXLocalizer.html>
I'll have a look for sure, I just want to know the "built-in" way to do it:)

Xavier

_______________________________________________
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: custom display for WOToManyRelationship destinationDisplayKey
      • From: Fabian Peters <email@hidden>
References: 
 >custom display for WOToManyRelationship destinationDisplayKey (From: Dev WO <email@hidden>)
 >Re: custom display for WOToManyRelationship destinationDisplayKey (From: Lachlan Deck <email@hidden>)
 >Re: custom display for WOToManyRelationship destinationDisplayKey (From: Dev WO <email@hidden>)
 >Re: custom display for WOToManyRelationship destinationDisplayKey (From: Fabian Peters <email@hidden>)

  • Prev by Date: Re: Proper place for functions in KVC paths?
  • Next by Date: UTF8, MySQL, and JDBC
  • Previous by thread: Re: custom display for WOToManyRelationship destinationDisplayKey
  • Next by thread: Re: custom display for WOToManyRelationship destinationDisplayKey
  • Index(es):
    • Date
    • Thread