Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Need help for Html page in RCP ViewPart(i need to view html file in rcp viewpart)
Need help for Html page in RCP ViewPart [message #1075905] Tue, 30 July 2013 09:56 Go to next message
Ashokkumar N is currently offline Ashokkumar NFriend
Messages: 1
Registered: July 2013
Junior Member
I created a simple rcp application to view html page while i using web address it will open.But it not display local html file.I am beginner in rcp application.


import java.io.File;
import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.ProgressEvent;
import org.eclipse.swt.browser.ProgressListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
 
public class CustomView extends ViewPart {
 
    public void createPartControl(Composite parent) {
      
        final Browser b = new Browser(parent, SWT.NONE); // Uses IE on MS Windows
              b.setUrl("C://Users/User/Desktop/demo.html");
        b.addProgressListener(new ProgressListener() {
            @Override
            public void completed(ProgressEvent event) {
                System.out.println("Page loaded");
                try {
                    Thread.sleep(2000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
               
            }
            @Override
            public void changed(ProgressEvent event) {
            }
        });
    }
 
    
    public void setFocus() {
    }
}


The browser shows an error like,check your web address and internet.

Advance thanks for your response.


Re: Need help for Html page in RCP ViewPart [message #1079006 is a reply to message #1075905] Sat, 03 August 2013 23:34 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1684
Registered: July 2009
Senior Member

Try using your file URL as "file:///C:/Users/User/Desktop/demo.html"

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.

[Updated on: Sat, 03 August 2013 23:35]

Report message to a moderator

Previous Topic:Migrate from BIRT 3.7.0 to BIRT 4.3.0
Next Topic:how to disable stack trace with BIRT 2.6.1 - confirm steps within please
Goto Forum:
  


Current Time: Fri Dec 19 20:22:50 GMT 2014

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

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