Skip to main content



      Home
Home » Archived » BIRT » Localization issue with parameters group prompts(This issue happens in a custom portlet and birt WebViewer)
Localization issue with parameters group prompts [message #759026] Fri, 25 November 2011 11:12 Go to next message
Eclipse UserFriend
Hi,

in a portlet tomcat context, API 3.7.1, i use this below code to retrieve parameters definition.As shown in the code, i use task.setLocale(request.getLocale()) to manage localization. I have an issue with parameters groups prompt, it seems it doesnt use the correct language value (it uses my tomcat's locale, instead of request.getLocale()), whereas scalar parameters prompt are correct.
Anyone used these group prompt successfully with api?
Should i log a bugzilla entry or am i doing something wrong?

EDIT: i tried my report with WebBirtViewer, and this kind of url:

http://localhost:8080/birt/frameset?__report=report/welcome.rptdesign&__locale=en

I got exactly the same issue than in my portlet: In parameters Dialog, Viewer displays scalar with "en" locale values, but parameters groups with "fr" values Sad



Thanks!

        IGetParameterDefinitionTask task = birtReportEngine.createGetParameterDefinitionTask(this.getRptDesign()); 
        task.setLocale(request.getLocale());
        Collection params = task.getParameterDefns( true );
        
        Iterator iter = params.iterator( );
        while ( iter.hasNext( ) ) {         
            IParameterDefnBase param = (IParameterDefnBase) iter.next( );
            if ( param instanceof IParameterGroupDefn ){
                IParameterGroupDefn group = (IParameterGroupDefn) param;
 		Iterator iterGroup = group.getContents( ).iterator( );      
               // -------> group.getPromptText() and param.getPromptText() returns 'fr_FR' value, wich is my desktop local

		}                
            }else{
               // -------> param.getPromptText()  returns the request.getLocale() value, which is the expected behavior
            }
             
         }//end while
        task.close();

[Updated on: Fri, 25 November 2011 14:13] by Moderator

Re: Localization issue with group prompts [message #759504 is a reply to message #759026] Mon, 28 November 2011 15:16 Go to previous messageGo to next message
Eclipse UserFriend
This does appear to be a bug. Can you open a bugzilla request?

Jason

On 11/25/2011 11:12 AM, dpardon wrote:
> Hi,
> in a portlet tomcat context, API 3.7.1, i use this below code to
> retrieve parameter definition.As shown in the code, i use
> task.setLocale(request.getLocale()) to manage localization. I have an
> issue with parameters group prompt, it seems it doesnt use the correct
> language value, whereas scalar parameters prompt are correct. Anyone
> used these group prompt successfully with api? Should i log a bugzilla
> entry or am i doing something wrong?
>
> Thanks!
>
>
> IGetParameterDefinitionTask task =
> birtReportEngine.createGetParameterDefinitionTask(this.getRptDesign());
> task.setLocale(request.getLocale());
> Collection params = task.getParameterDefns( true );
> Iterator iter = params.iterator( );
> while ( iter.hasNext( ) ) { IParameterDefnBase param =
> (IParameterDefnBase) iter.next( );
> if ( param instanceof IParameterGroupDefn ){
> IParameterGroupDefn group = (IParameterGroupDefn) param;
> Iterator iterGroup = group.getContents( ).iterator( ); // ------->
> group.getPromptText() and param.getPromptText returns 'fr_FR' value,
> wich is my desktop local
>
> } }else{
> // -------> param.getPromptText() returns the request.getLocale(), which
> is the expected behavior
> }
> }//end while
> task.close();
>
Re: Localization issue with group prompts [message #759768 is a reply to message #759504] Tue, 29 November 2011 16:42 Go to previous message
Eclipse UserFriend
Hi Jason,

I have logged this issue as Bug 365139
Previous Topic:Mismatch dataset count
Next Topic:Link in the report
Goto Forum:
  


Current Time: Wed Jul 23 12:53:53 EDT 2025

Powered by FUDForum. Page generated in 0.08131 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top