cancel
Showing results for 
Search instead for 
Did you mean: 

FileUpload UI Question

Former Member
0 Kudos

Hi All,

I have a question concerning the FileUpload UI, hope someone can answer me.

- Why before uploading a file, the following code have to execute first in wdDoInit()?

"wdContext.currentContextElement().node().getNodeInfo().

getAttribute("PdfSource");"

- Suppose the FileUpload will save the content to a binary context node, say "pdfObject" in view controller, can I map the "pdfObject" to component controller context in design time? Because I come across some sample that it will map the context node from view controller to component controller explicitly in code, so that the mapping occur at runtime, like "wdThis.wdGetTravelRequestCompController().wdGetContext().currentContextElement().setPdfObject(wdContext.currentContextElement().getPdfObject());", any reasons behind?

Thanks all,

Kelvin

Accepted Solutions (1)

Accepted Solutions (1)

arun_srinivasan
Contributor
0 Kudos

hi,

The dataproperty must be bound to this value attribute of data type binary, so that the file can be uploaded as a byte array. At runtime, the binary data type can be enriched with data to allow the passing of related information when uploading a file.

Refer the data binding of the fileupload ui in this link.It will clear ur doubt

http://help.sap.com/saphelp_nw04/helpdata/en/0e/23b3c8b0a238439f664f73a04e6332/frameset.htm

let me know if it helps,

hope this helps u,

Regards,

Arun

Former Member
0 Kudos

Thanks arun.

I read this but i don't know the meaning of "enriched with data to allow the passing of related information when uploading a file". Is there any example concerning this? does it mean some mime type like PDF or JPG information cannot be upload of getModifiableSimpleType not call in advance?

arun_srinivasan
Contributor
0 Kudos

hi kl,

During runtime content in the file is uploaded as a byte array. The binary data type contains all the data about the file.

u refer this sample document and tutorials https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on designing user interfaces with web dynpro - 23.htm

let me know if it helps,

hope this helps u,

regards,

Arun

Answers (1)

Answers (1)

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hallo Kelvin,

we will publish a new Tutorial on Uploading and Downloading Files in Web Dynpro Java on SDN very soon.

Regards, Bertram