on 08-17-2005 8:57 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.