on 02-25-2015 6:47 AM
Hello,
We have the problem for printing in Web Dynpro.
In our report we have link "Print". When user clicks at this link we generate HTML page, by adding html lines to StringBuffer
StringBuffer xml_file = new StringBuffer();
...
xml_file.append("</TBODY></TABLE></div></BODY></HTML>");
Then, when we added all html lines, we create WEB resource and get the url to this resource:
IWDCachedWebResource xlfile = WDWebResource.getWebResource(xml_file.toString().getBytes("UTF-8"), WDWebResourceType.HTML);
linktoFile = xlfile.getURL();
and open new page using this URL.
wdComponentAPI.getWindowManager().createNonModalExternalWindow(linktoFile ).show();
But sometimes when user clicks "Print" we get blank page with the status/message "400 Bad Request". Then user can click "Print" again and all is ok. So data, which we want to display, are nor guilty.
I think that it may happens because created resource is expired and doesn't exist.
Please advise how it can be solved.
Regards,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aviad,
Thank you. Seems that it works.
But now I get another question.
IWDCachedWebResource xlfile = WDWebResource.getPublicCachedWebResource(b, WDWebResourceType.HTML, WDScopeType.CLIENTWINDOW_SCOPE, deplPart, "PrintDowntimeLine");
How long will pages, which were generated using this method, will be available?
Pages which were generated few hours ago are still available
I tried all types of WDScopeType, I closed the browser, but pages are still accessable using URLs.
I am afraid that these files may fill up the file system of server.
Hi,
According to http://help.sap.com/javadocs/NW73EHP1/SPS14/CE/wdr/com.sap.wdr/index.html there are only two types of scopes APPLICATION_SCOPE
and TASK_SCOPE.
My guess is that they both rely on browser cache somehow.
Aviad
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.