cancel
Showing results for 
Search instead for 
Did you mean: 

Deprecated methods

Former Member
0 Kudos

Hi people,

I need a little help with a project that I m trying to do the maintenance, but I m getting to a point that I m getting lost. I m having a lot of this type of messages and I dont find at the documentation a way to change to the newest version of theses methods. In fact this happen with some methods but I got this one just as a example of what is happening. I f somebody can help me with that I wiill appreciate. Thanks in advance.

The method bindData(String) from the type IWDFileUpload is deprecated

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mario,

Check this link

[http://help.sap.com/javadocs/nwce/ce71/wdr/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDFileUpload.html]

Its advises to use Resource property.

Can u pls give a brief idea about what ur requirement is? I think I will be able to help you better then

Regards,

Sattam

Former Member
0 Kudos

Hi Sattam,

I m doing a review of a peace of code but I m kind of new with webdynpro, so as I know a little of java I noticed that the deprecated warning it is not good at all and should be avoided. So trying to avoid that, I m facing this peace of code:

com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDFileUpload _fupItems = com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDFileUpload) wdAlterEgo.createElement(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDFileUpload.class, "fupItems");

_fupItems.bindData("FileUploadNode.Data"); // here is where I get the deprecated warning on the bindData method

So the problem is it was not me who made this code, and as I m new with this tool, I m not finding a way to solve that problem, like this one I have a lot more deprecated methods being used in this application and I m looking forward to take this deprecated methods out of the application. So if anybody can help me I will appreciate very much.

[]´s

Mario

Former Member
0 Kudos

This piece of code is part of a view and is generated by the IDE. You should not edit this code at all. To get rid of the deprecation warnings, you have to change the view using the View Designer and replace the usage of the deprecated "data" property by the recommended replacement. But this of course requires an understanding of the FileUpload UI element's working.

Former Member
0 Kudos

Thanks for your help, I understand that I cant change this code, the only thing I dont know how to do it is exactly the part of "data" property I have to change, I have to go to the LAYOUT tab and do something? Sorry about this question but I m really new with this tool/ide and I have no idea what to do so any more help will be appreciated.

[]´s

Mario

Former Member
0 Kudos

Hi Mario,

I think the application has something to do with uploading a file. The latest method is to use a File Upload UI element, and it needs to be attached to a context element.

To change the view, u need to go to the layout , identify the upload element and replace it by a File Upload element.

But make corresponding changes in the code also.

Hope it helps,

Sattam.

Former Member
0 Kudos

The WD Java Demo Kit (see top thread) contains a tutorial for the file upload functionality:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9076a593-2b08-2d10-2890-9a7078246ec4

On the other side, if you are completely new to WD it might be risky to change some working application just to avoid a deprecation warning.

Former Member
0 Kudos

Hi,

I appreciate your help, as you already know I m very new on WD but I m a java programmer, I know it is just similar not the same, thats why I coming to the forum to get answers to my questions, and as I know I m not the expert I m not changing any working code, I m just doing like a code review, and suggesting to the team responsable to do the improvements, but as I want to learn more about WD I should bring my questions to be a better professional on it. And again I allways will appreciate any help with that.

Thanks again for your help

[]´s

Mario

Former Member
0 Kudos

Hi Mario,

You can suggest the coding team to use a file upload ui element and bind data to the resource property.

Sattam