cancel
Showing results for 
Search instead for 
Did you mean: 

sample code on Creation of Fileupload UI element in Dialog boxes

Former Member
0 Kudos

Hi all

i have a requirement like when i click on the button then i need to generate one dialogbox where i create the UI elements like FileUpload.

can anybody send the sample code on the same?

Regards

Sunil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sunil,

Create a new modal or confirmation window and follow the tutorial given in following link:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a...

I hope this may help you.

Former Member
0 Kudos

Hi Aishwarya

it is great help to me and it was so much useful to me

Regards

Sunil

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sunil,

Glad to know that the solution was helpful to you. Thank you.

Former Member
0 Kudos

Hi,

Below is the sample procedure to save text to .txt file, where you can get dialog box like Fileupload

You can simply create a button on click of which you can write the following code and test your application. It will be saved as text file.

String abc = "what ever you want to save to text file save it in the string format";

try

{

IWDCachedWebResource resource = WDWebResource.getWebResource

(

abc.getBytes("UTF-8"), WDWebResourceType.UNKNOWN

);

resource.setResourceName("Doke.txt");

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(

resource.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()),

resource.getResourceName());

window.show();

}

catch(Exception ex)

{

wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );

}

or else go for creating confirmation window.

Regards

Raghu