on 02-25-2009 8:37 AM
Hi,
I faced below issue and don't know how to resolved it. Please help.
The method getWebResource(byte[], WDWebResourceType) from the type WDWebResource is deprecated
The source code is as below:
byte[] pdfContent = wdContext.currentOutputElement().getBin_File();
IWDCachedWebResource pdfResource = WDWebResource.getWebResource(pdfContent,WDWebResourceType.PDF);
try {
wdContext.currentInternalElement().setUrl(pdfResource.getURL());
}catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
}
Thanks.
Deprecated means old version and may not run a optimal performance but you can still use the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Exactly
It also mean that in future it will removed from library .
other point for your clarification is that
Java never delete or put old library in bin but it simply create a new wrapper which is based on old and provide some additional functionality with better performance and usability and scalability .
Hope this session help you much.
Good luck
Satish Kumar
Hi,
Following is the migrated code
byte[] pdfContent = wdContext.currentOutputElement().getBin_File();
IWDResource pdfResourceNew = WDResourceFactory.createCachedResource(pdfContent, "My Resource", WDWebResourceType.PDF);
try {
wdContext.currentInternalElement().setUrl(pdfResource.getURL());
}catch (Exception e) {
wdComponentAPI.getMessageManager().reportException(e.getMessage(),true);
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
User this
com.sap.tc.webdynpro.progmodel.api.WDResourceFactory.createCachedResource(byte[], String, WDWebResourceType)}
Best Regards
Satish Kumar
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.