cancel
Showing results for 
Search instead for 
Did you mean: 

Error in uploading a File

Former Member
0 Kudos

Hi All,

when uploading a file i got a Exception

<b>"Parse method is not possible for this type"</b>

1)i used only two UIs in view

2)FileUpload UI and Button

3)For FileUpload UI i assigned the FileResource context attribute value for data property

4)action onActionUpload() is assigned for the Button UI. in this action simply displayed a success message

Problem: After choosing the file through the ChooseFile window, when i click on the button an exceptio of above type was raised

please help me

Thanks in advance

Siva Sankar N

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i had forgotten one thing,

if i take the FileResource as a String type then the sucess message was printed, if i take it as a Binary type then only the Exceptio was comming,

Please any one help me

Former Member
0 Kudos

Siva,

You must apply modifiable binary type in wdDoInit of controller:


ISimpleType stype =
  wdContext
    .node<YourNode>()
      .getNodeInfo()
        .getAttribute("FileResource")
          .getModifiableSimpleType();

IWDModifiableBinaryType mtype = (IWDModifiableBinaryType)stype;
/* Optional steps: affects only FileDownload control */
/* mtype.setMimeType( WDWebResourceType.JPG_IMAGE);  */
/* mtype.setFileName( "picture.jpg" );               */

Sure, to make above work you must use binary type in context designer.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

Thanks a lot,

i have a small doubt, why we use this modifiable binary type

Thanks

Siva Sankar N

Former Member
0 Kudos

Hi Valery,

Thanks a lot,

i have a small doubt, why we use this modifiable binary type

Thanks

Siva Sankar N

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi siva,

are you working with NW 2004 or with 2004s? Which SP?

Kind Regards

Stefanie