Skip to Content
avatar image
Former Member

File Upload control in Web dynpro

Hi all,

i am trying to build an application using FileUpload control in webdynpro.

The upload control gives error message that "parse method is not possible for this type".

please help me.

can anybody suggest a link to an example or Tutorial.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 25, 2005 at 05:08 AM

    Hi,

    You need to assign an attribute of type binary for the data property of FileUpload UI element and implement the below code in the init() method.

    IWDAttributeInfo attInfo=

    wdContext.getNodeInfo().getAttribute("File");

    IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)attInfo.getModifiableSimpleType();

    If you assign the attribute and still didnot write the above code you will get the error message "parse method is not possible for this type"

    Hope this info will be helpful.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I think u r not writing the data into a file properly.

      U should create a file in a directory and write the data that is there in the attribute of type binary to the file.

      FileOutputStream out = new FileOutputStream(new File (fileName));

      out.write(wdContext.currentContextElement().getFile());

      out.close();

      Here File is the attribute of type binary that I have binded to the file upload control.

      I think this will solve ur problem.

  • avatar image
    Former Member
    Feb 02, 2005 at 07:59 AM

    FileUpload control should have binding with only view.

    If we bind data property of File Upload control to view's context element and then bind that context element to any controllers than it will give above the error.

    Add comment
    10|10000 characters needed characters exceeded