Sorry, not enough details in my previous email.
I have created my own velocity page layout. However, I need to localize
it. So I copied the resources directory from the "blueOcean" layout and
tried to access the properties in the way you mentioned.
<b>$rootFragment.decoration.getResourceBundle($preferedLocale,$JS2RequestContext).getString("desktop.pageeditor.dialog.labels.deletepage")</b>
However, this is not working. The object $rootFragment.decoration. is
defined but,
$rootFragment.decoration.getResourceBundle($preferedLocale,$JS2RequestContext)
is not.
Can you please let me know if I am doing something wrong?
Thank you.
Mansour Al Akeel wrote:
David Sean Taylor wrote:
Finally, if you want to associate a resource file with a decorator,
there are some calls available to you on the Decoration interface:
/**
* @return the resource bundle locator prefix.
*/
String getResourceBundleName();
/**
* @return the resource bundle for the given Locale and
RequestContext.
*/
ResourceBundle getResourceBundle( Locale locale,
org.apache.jetspeed.request.RequestContext context );
So say in your layout decorator, add this line:
<b>$rootFragment.decoration.getResourceBundle($preferedLocale,
$JS2RequestContext).getString("desktop.pageeditor.dialog.labels.deletepage")</b>
I have created a new decorator and I want to use resources. So I
created a "resources" directory in the root of the decorator, but I am
unable ot access the properties in these files. The decorator is in
velocity, How do I get these values ?
and it should print (for the tigris layout decorator):
"Are you sure you want to delete this page?"
So you can add resources to the decorator under the
resources/Messages_(XX).properties
where XX is the language code such as "en" or "fr" or "de"
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]