on 06-02-2006 11:27 AM
Hi,
During migration of web dynpro programs from 6.4 to 7.0, the Netweaver Developer Studio warns that <b>WDWebResource.getWebResource()</b> has been deprecated. Although the deprecated still works, what should be its replacement?
Tony Kwan
Hi Tony,
Yes it is true that the method has been deprecated but only two of its implementations, not all.
Propbably you are using the getWebResource(byte[] , WDWebResourceType , boolean ) type, while in the current version of the webdynpro API, the boolean field is not required.
For more information of on the WDWebResource class refer to the following API link,
Regards,
Guru.
PS: Reward points for usefull tips.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gurvinder,
Thanks for your information & URL. I am now using <b>getWebResource(byte[] webResource, WDWebResourceType resourceType)</b>, which is also deprecated at WAS 7.0 .
Only 2 methods of <b>WDWebResource</b> are not yet deprecated, which both require <b>WDDeployableObjectPart</b>. How the WDDeployableObjectPart can be created from a byte array, so that programmatically created data can be downloaded as a file?
Thanks!
Tony
I found the proper way of file download (forgot where I found it) (long time ago, well...) for NW2004s and post it here for the information of the interested developers.
<u>Step 1</u>
create a value attribute of type Resource
<u>Step 2</u>
wdContext.currentContextElement().setXXX(
WDResourceFactory.createCachedResource(data,filename,objecttype));
<a href="https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/WDResourceFactory.html">WDResourceFactory.createCachedResource()</a>
<u>Step 3</u>
bind the FileDownload->resource to the above value attribute but leave FileDownload->data empty
<u>Step 4</u>
throw away stuff about WDWebResource & IWDModifiableBinaryType so that no deprecation warning anymore
Tony
User | Count |
---|---|
86 | |
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.