Access java properties from .js controller in WCMQS
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2014 04:25 PM
In my WCMQS application I am in need to access a localized property from within the component javascript controller.
I added a custom property to the existing messages property file in the web application:
common_it.properties
myproperty=x
common_en.properties
myproperty=y
Then, this is just a guess, obviously not working.
mycomponent.get.js
var myprop = msg['myproperty']; // <– just a guess
// various operations…
I added a custom property to the existing messages property file in the web application:
common_it.properties
myproperty=x
common_en.properties
myproperty=y
Then, this is just a guess, obviously not working.
mycomponent.get.js
var myprop = msg['myproperty']; // <– just a guess
// various operations…
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2014 12:45 AM
You can try this msg.get("myproperty");
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2014 04:01 PM
It seems to work, but I am only getting the same locale, even if the browser is set to different language.
