Skip to Content
avatar image
Former Member

sample code on Creation of Fileupload UI element in Dialog boxes

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2008 at 01:38 PM

    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-f1088c3a4d71

    I hope this may help you.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 01:38 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 04:55 AM

    Hi Sunil,

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

    Add comment
    10|10000 characters needed characters exceeded