on 06-22-2007 5:46 AM
I have a file upload component and one button in a view.
I have created a binary type context element and mapped it with fileupload component.while clicking the submit button I am getting " Parse method is not possible for this type" exception.
help me out.
HI Sridhar,
U must add
IWDAttributeInfo file=wdContext.nodeUpolad().getNodeInfo().getAttribute(IPrivateHomeView.IContextElement.<UploadVariable>);
IWDModifiableBinaryType b=(IWDModifiableBinaryType)file.getModifiableSimpleType();
in the wdDoinit()
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am trying to upload a file to km using webdynpro java. I am using sap netweaver 04. i have a FileUpload ui and a upload button. Context i created an attribute of type "binary". I got an error at runtime
" Parse method is not possible for this type". How did you resolve this error. I cannot find "Resource". You have some blog or code for this.
Could you please help me out in solving this issue?
Regards,
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sridhar,
Use this code for Upload
context u create one attribute(up),u assign the data type as "Resource"(which is dictionary type)
InputStream text = null;
int temp = 0;
try
{
File file = new File(wdContext.currentContextElement().getUp().getResourceName());
FileOutputStream op = new FileOutputStream(file);
if(wdContext.currentContextElement().getUp()!=null)
{
text = wdContext.currentContextElement().getUp().read(false);
while((temp=text.read())!=-1)
{
op.write(temp);
}
}
op.flush();
op.close();
}
catch(Exception e)
{
e.printStackTrace();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please use <a href="/people/community.user/blog/2006/10/18/how-to-parse-xml-file-uploaded-from-client blog for a way to use the FileUpload UI element. Don't use the binary types.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
U have to create two contexts, one of type binary and bind it to data property of FileUpload UI element and other of type type com.sap.ide.webdynpro.uielementdefinitions.Resource and bind it to Resource property of FileUpload UI.. now paste the code of ur action here..
Read this
/people/bertram.ganz/blog/2007/05/25/new-web-dynpro-java-tutorials--uploading-and-downloading-files-in-sap-netweaver-70
Regards
Puneet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.