on 02-03-2009 7:53 PM
Hi,
I'm working on a java web dynpro component. This component consists of document upload field, where users should be able to upload .txt documents. These uploaded text documents should then be somehow read, and thir content displayed. I am already able to upload documents using the upload field, and store it in the context, but I'm still not able to extract the content of these text documents for displaying.
Does anyone have any suggestions of how I could do this?
Any help will be greatly appreciated!
Thanks!
Hi Alain,
You can do through this document on how to upload/download files in Webdynpro.
[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f]
Once you have the uploaded file in your context if you are storing it as a byte array then convert it to a string using the String constructor String(byte[] bytes) and then you can store this string in an attribute of type String which could be bound to a UI element (TextArea) to display the contents.
If you are using an IWDResource then you will get an inputstream from which you can read the data and convert it to a string for display as mentioned above.
Hope this helps.
Sanyev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.