how to make birt supprt i18n in osgi application [message #640445] |
Mon, 22 November 2010 02:36  |
Eclipse User |
|
|
|
Hi,i use birt in an osgi application. Each report template and relative resource file(for i18n) are packaged as bundle jar,we can call them as template bundle
when i render the report ,i set the locale to the renderoption, however,there seem to be no effect.
i guess that the classloader for rendering can't see the resources in the template bundle.
Is it right? how can i make it render rightly, or how can i make it support i18n in osgi application.thanks!
|
|
|
|
Re: how to make birt supprt i18n in osgi application [message #640757 is a reply to message #640657] |
Mon, 22 November 2010 22:43   |
Eclipse User |
|
|
|
yes,i develop the report template in the birt designer and do a preview by the view plugins,all seem to be ok.
At runtime,i write my code for rending and representing the rende result.
But ,if i package the report into a jar ,as a bundle,the mssage resource files can't be found by the report engine.
I review the birt source code,and the view plugins's source code,and find two solutions: write a classloader or write implement for org.eclipse.birt.report.model.api.IResourceLocator ,i just want to know ,is there any better way to let the resource file be found in this scene-report template are packaged as a bundle.
by the way ,the version i use is 2.3.2.
|
|
|
Re: how to make birt supprt i18n in osgi application [message #640945 is a reply to message #640757] |
Tue, 23 November 2010 10:49   |
Eclipse User |
|
|
|
I am still a bit confused. Are you setting the resource folder in your
code to a hard location?
Jason
On 11/22/2010 10:43 PM, ice_stream@163.com wrote:
> yes,i develop the report template in the birt designer and do a preview
> by the view plugins,all seem to be ok.
> At runtime,i write my code for rending and representing the rende result.
> But ,if i package the report into a jar ,as a bundle,the mssage resource
> files can't be found by the report engine.
> I review the birt source code,and the view plugins's source code,and
> find two solutions: write a classloader or write implement for
> org.eclipse.birt.report.model.api.IResourceLocator ,i just want to know
> ,is there any better way to let the resource file be found in this
> scene-report template are packaged as a bundle.
> by the way ,the version i use is 2.3.2.
>
>
|
|
|
Re: how to make birt supprt i18n in osgi application [message #641090 is a reply to message #640945] |
Wed, 24 November 2010 03:59  |
Eclipse User |
|
|
|
yes,i did.
i solve this question by writing an implement of the org.eclipse.birt.report.model.api.IResourceLocator ,and the class will goto the special place to load message resources.
When the method named openReportDesign in reportEngine is invoked,the resourceLocator is assigned as a parameter.
|
|
|
Powered by
FUDForum. Page generated in 0.03911 seconds