on 08-05-2008 2:05 PM
I was trying to open non-model external window but application isn't opening the window, can any body tell me whats wrong with my code:
TestReport report = new TestReport();
byte[] pdfData= report.getReportData();
IWDResource pdfResource = WDResourceFactory.createResource(pdfData, "TestReport.pdf", WDWebResourceType.PDF);
String urlToFile = pdfResource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
IWDWindow pdfWindow = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToFile, "View Report");
pdfWindow.show();
Actually I was trying to open pdf document in external window but nothing is opening, so I just made it simple and nothing happened.
IWDWindow pdfWindow = wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.yahoo.com", "View Report");
pdfWindow.show();
thanks
jawed,
IWDWindow pdfwindow = wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
pdfwindow.show();
is correct.
Not sure that why it is not showing. check the action is being called.
try casting too
IWDWindow pdfwindow = (IWDWindow)wdComponentAPI.getWindowManager().createNonModalExternalWindow("http://www.google.com","google");
pdfwindow.show();
but this one not needed. just give a try.
in firefox, you can set enable popups to show popup windows
nikhil
Edited by: Nikhil ßos on Aug 6, 2008 10:30 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't think there is any thing to do with popup blocking:
1) when Firefox blocks a popup it intimates
2) I have my URL added in exception list of popup blocks, so its out of question i guess
There are control that don't run perfectly on Firefox but they run IE; I guess SAP doesn't vouch using firefox either.
Jawed Ali
Hi
Inplace of CreatenonmodalExternalWindow() method use creatExternalwindow() i think it will work
Thanks,
Tulasi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I use the following code to display PDF file in external window
IWDCachedWebResource resource;
String fileName = "pdf_file_name"
//Get PFC web resource URL, you need the PDF stream return from ABAP RFC
resource = WDWebResource.getWebResource(wdContext.currentY_PDFElement().getPdfStream(), WDWebResourceType.PDF);
resource.setResourceName(fileName);
String PDF_URL = resource.getURL());
//Open the PDF in new window
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getURL(), "PDF File");
window.setWindowPosition(5, 5);
window.setWindowSize(600, 600);
window.open();
Hope this will helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this
pdfWindow.open();
instead of
pdfWindow.show();
Regards,
P.Manivannan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.