Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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 a 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.

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.