cancel
Showing results for 
Search instead for 
Did you mean: 

Upload problems

Former Member
0 Kudos

Hi All,

I'm using UI Upload object, but I got the following error trying to upload any type file:

"Parse method is not possible for this type"

Using: Studio is SP11, NW 04.

Any ideas?

Regards,

Rogério

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you give more details?

Do you get an exception, if yes, what is the stack trace?

How does the data binding look like, context structure etc.

Armin

Former Member
0 Kudos

I'm not receiving a stack trace or an exception, because, I think that the component is threating this itself and responding that message.

  • Context Structure:

+ File + (1..1)

-------- filedata (binary)

-------- filename (string)

  • Component Properties:

data: File.filedata

fileName: File.filename

  • Action method:

...

File file = new File(...);

FileOutputStream fos = new FileOutputStream(file);

fos.write(fileelement.getFiledata());

fos.close();

...

I think that my action method is not been called.

No matter what type of file I try, it gives me the same error: "Parse method is not possible for this type".

Regards,

Rogério

Former Member
0 Kudos

Searching this forum I found the following answer by Thomas Chadzelek:

Read Re: file upload

Posted: Aug 13, 2004 12:09 PM

Hello Robert,

the tricky part here is that you must modify (at runtime) the type of the attribute that will hold the uploaded data.

At design time, you use "binary" as type. Then, in wdDoInit() of the controller whose context contains that attribute, you write something like the following (adjust the names to your needs):

IWDModifiableBinaryType type = (IWDModifiableBinaryType) wdContext.nodeXYZ().getNodeInfo().getAttribute(IPrivateABCView.IXYZElement.ATTRIBUTE).getModifiableSimpleType();

Best regards,

Thomas

--

Armin

Answers (0)