Hi folks,

I'm interested in having localized titles for the portlets, but not
really interested in maintaining different psml files, since the layout
for each locale the same.

I saw some pointers in this thread:
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&by=thread&from=305498

And have been sucessful in overriding the getTitle() method on the
VelocityPortlet.  However, Kim asks the $64000 question:

"Any pointers on how to get [the locale] inside the getTitle() method?"

I was looking through some of the other Jetspeed source code and saw
this kind of call:

   this.runDataService =
   (JetspeedRunDataService)TurbineServices.getInstance()
       .getService(RunDataService.SERVICE_NAME);
    rundata = this.runDataService.getCurrentRunData();

This seemed like it would work, since if the rundata can give me the
user object.  However, when I put this code in my subclass of
VelocityPortlet, I don't get a JetspeedRunDataService back from 
TurbineServices.getInstance().getService(RunDataService.SERVICE_NAME)

Instead, I get an instance of
org.apache.jetspeed.services.resources.JetspeedResourceService, even
though RunDataService.SERVICE_NAME is "RunDataService".

I tried just instantiating JetspeedRunDataService and calling init on
it, but that give me a null pointer exception (and the Turbine services
webpage implies that that is not what I should be doing, since services
are singletons:
http://jakarta.apache.org/turbine/turbine/development/turbine-2.3/services/index.html).

What's the proper way to get the User object from a VelocityPortlet? 
I'm overriding getTitle(), so I need to get the User object in there.

Thanks,
Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to