Webviewer inside RCP Application not working with Indigo [message #693833] |
Thu, 07 July 2011 09:31 |
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 11: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 17:50 |
|
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 #694555 is a reply to message #694513] |
Fri, 08 July 2011 20:03 |
|
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 #695579 is a reply to message #694797] |
Tue, 12 July 2011 04:04 |
|
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 ?
|
|
|
Powered by
FUDForum. Page generated in 0.02814 seconds