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