on 11-26-2008 9:21 AM
Hi ,
I am doing File upload application. I am sending code
public void onActionUploadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionUploadFile(ServerEvent)
IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(
IPrivateFileUploadView.ICtx_vn_UploadDownloadFileElement.CTX__VA__FILE_RESOURCE);
//Get Modifiable binary type from the attribute info ,
//requires type cast.
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
IPrivateFileUploadView.ICtx_vn_UploadDownloadFileElement fileElement = wdContext.currentCtx_vn_UploadDownloadFileElement();
if(fileElement.getCtx_va_FileResource() != null)
{
try{
String mimeType = binaryType.getMimeType().toString();
byte [] file = fileElement.getCtx_va_FileResource();
//Get Extension of Uploaded File
fileElement.setCtx_va_FileExtension(binaryType.getMimeType().getFileExtension());
msgMgr.reportSuccess("File Extension :" + wdContext.currentCtx_vn_UploadDownloadFileElement().getCtx_va_FileExtension());
msgMgr.reportMessage(IMessageFileUpDownloadComp.SF_UPLOAD,new Object[] {binaryType.getFileName()}, false);
}catch(Exception e)
{
throw new WDRuntimeException(e.getMessage());
}
}
For SF_Upload , I created message pool like message "File "" Created"
I am getting error in this action like "Illegal Argument Exception".
Please do the needfull.
Thanks
Risha
Hi Risha,
Please check the line number on which you are getting this error and paste that portion of code in the thread
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Problem Solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.