cancel
Showing results for 
Search instead for 
Did you mean: 

how to browse local file using web dynpro

Former Member
0 Kudos

hi everyone

How can I browse local file using Web Dynpro?And read file names into Context or array. I have tried the following code but its not working

String resourcePath = WDURLGenerator.getResourcePath();

String depObjResourcePath = WDURLGenerator.getResourcePath(“Test”);

WDDeployableObjectPart appPart = WDDeployableObject.getPart(“Test”, “TestApp”, WDDeployableObjectPart.APPLICATION);

help required urgently

Thanks & Regards

Jaspreet Kaur

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186016
Active Contributor
0 Kudos

Use FileUpload UI Element.

The FileUpload UI element is used to upload files from the client to the server.

Data binding:

Property resource determines the data sink in the context, property fileName stores the filename of the uploaded file. The content-mime-type of the uploaded file is saved on the server in the data type.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

hi Ashwini

Basically i want to get the list of files present in a file and then compare it with a file present in my context which will come dynamically in accordance to the user who logs in...then I want to compare these two ie list of contents present in a file with the individual content placed in my context and if they match i shall do the further action...Pls see if u can help me with this...by the fileupload i will be able to physically browse through the directory structure but thats not wut a i require.

Thanks & Regards

Jaspreet Kaur

Former Member
0 Kudos

Hi Jaspreet,

Create a java file & write the code for getting all the files located in any particular folder.it will return u the list.From that list u can compare ur context.

regards

Sumit