Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Webviewer inside RCP Application not working with Indigo
Webviewer inside RCP Application not working with Indigo [message #693833] Thu, 07 July 2011 05:31 Go to next message
Patrick Schmitt is currently offline Patrick Schmitt
Messages: 87
Registered: July 2009
Member
I have an Eclipse RCP application, just upgraded to Eclipse Indigo.
Now I noticed the BIRT webviewer is not working anymore.

I also found the problem out:

Due to a bugfix (https://bugs.eclipse.org/bugs/show_bug.cgi?id=336767) the method isValidFilePath returns false.

// check and aply url report path policy
if ( !POLICY_ALL.equalsIgnoreCase( urlReportPathPolicy ) )

This statement inside the method is true, because urlReportPathPolicy is null.

I use following code to run the webviewer:

       Browser browser = new Browser(parent, SWT.NONE);
        
		Bundle bundle = Activator.getDefault().getBundle();
		URL url = null;
        URL installURL =   bundle.getEntry( "/" );
		
        // Settings for the report viewer
        HashMap<String,String> myparms = new HashMap<String,String> ();
        myparms.put("SERVLET_NAME_KEY", "frameset");
        myparms.put("FORMAT_KEY", "html");
  

        try
        {
			url = new URL(installURL, "/bchistory_report_rcp.rptdesign");
		} 
	    catch (MalformedURLException e)
		{
			ModelEditorErrorHandler.showException(e, Activator.PLUGIN_ID);
		}
        
        // bugfix, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=291551
        browser.addOpenWindowListener(new OpenWindowListener()
        {
           public void open(WindowEvent event)
           {
              new
              	org.eclipse.birt.report.viewer.browsers.embedded.EmbeddedBrowser(event,
                 Display.getCurrent().getActiveShell());
           }
        });

        if(new BCHistoryReport().getBCHistoryData().size() > 0)
        {
            WebViewer.display(url.toString(), browser, myparms); 
        }


I did not find a solution to set this variable from outside. Can anybody give me a hint please ?


Sincerly Patrick

[Updated on: Thu, 07 July 2011 07:00]

Report message to a moderator

Re: Webvier inside RCP Application not working with Indigo [message #694500 is a reply to message #693833] Fri, 08 July 2011 13:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Patrick,

Are you using the designer plugins or the runtime download?

Jason

On 7/7/2011 5:31 AM, Patrick Schmitt wrote:
> I have an Eclipse RCP application, just upgraded to Eclipse Indigo.
> Now I noticed the BIRT webviewer is not working anymore.
>
> I also found the problem out:
>
> Due to a bugfix (https://bugs.eclipse.org/bugs/show_bug.cgi?id=336767)
> the method isValidFilePath returns false.
>
> // check and aply url report path policy
> if ( !POLICY_ALL.equalsIgnoreCase( urlReportPathPolicy ) )
>
> This statement inside the method is true, because urlReportPathPolicy is
> null.
>
> I did not find a solution to set this variable from outside. Can anybody
> give me a hint please ?
>
>
> Sincerly Patrick
>
>
Re: Webvier inside RCP Application not working with Indigo [message #694513 is a reply to message #694500] Fri, 08 July 2011 14:24 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick Schmitt
Messages: 87
Registered: July 2009
Member
I am using the Birt packages shipped with Eclipse Modeling Edition.
Re: Webvier inside RCP Application not working with Indigo [message #694555 is a reply to message #694513] Fri, 08 July 2011 16:03 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Patrick,

I tried with 3.7 and it worked fine for me but I am specifying a hard
location for my report. Are you using a url? This is going to be a
difficult one as the jetty viewer does not read the init parameters.

Jason

On 7/8/2011 2:24 PM, Patrick Schmitt wrote:
> I am using the Birt packages shipped with Eclipse Modeling Edition.
Re: Webvier inside RCP Application not working with Indigo [message #694797 is a reply to message #694555] Sat, 09 July 2011 15:22 Go to previous messageGo to next message
Patrick Schmitt is currently offline Patrick Schmitt
Messages: 87
Registered: July 2009
Member
I am using a URL, based on the install url of the plugin. see the attached source code from post #1

Any Idea what I can do ?
Re: Webvier inside RCP Application not working with Indigo [message #695579 is a reply to message #694797] Tue, 12 July 2011 00:04 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

The only thing I can think of is to checkout the viewer plugin and
change the source or use code in your app to locate the report like:

Bundle bundle =
org.eclipse.core.runtime.Platform.getBundle("org.eclipse.birt.examples.yourapp");


URL url = FileLocator.find(bundle, new
Path("/reports/myreport.rptdesign"), null);

String rpt = FileLocator.toFileURL(url).getPath();

Jason

On 7/9/2011 3:22 PM, Patrick Schmitt wrote:
> I am using a URL, based on the install url of the plugin. see the
> attached source code from post #1
>
> Any Idea what I can do ?
Previous Topic:Implementing an ODA
Next Topic:BIRT crashes on Mac OS X Snow Leopard
Goto Forum:
  


Current Time: Sat Aug 23 16:04:55 EDT 2014

Powered by FUDForum. Page generated in 0.01718 seconds