on 05-17-2005 6:18 PM
Is there some WD FileUpload api example code to try?
Im trying to use the File upload in a WD project but i get "com.sap.tc.webdynpro.services.sal.util.cache.WDResourceNotFoundException: Object could not be found in cache, key is null"
I apply all the advises written here in the forum, but I still have the same error.
my problem is, I have to receive two binary files.
so I have two fileUpload components (named fileCert an fileKey)
I have in the custom controller context two nodes (one for each file) with two value atributes (certFile.fileData binary and certFile.fileName String,
keyFile.fileData and keyFile.FileName)
both nodes have 1..n cardinality and 1..n Selection in the node properties
I mapped this nodes to the context of the view and bind them to the data property of the FileUpload UI element
in the action of the button submit i have this code:
wdThis.wdGetNDISAdminCustController().EncodeFileData();
in the wdInit of the custom controller i have:
ICertFileElement certElement = wdContext.createCertFileElement();
wdContext.nodeCertFile().bind(certElement);
IWDAttributeInfo CattInfo = certElement.node().getNodeInfo().getAttribute("fileData");
IWDModifiableBinaryType CbinaryType = (IWDModifiableBinaryType) CattInfo.getModifiableSimpleType();
CbinaryType.setFileName("d:
temp
TestCert.cer");
and the same thing for the keyData attribute:
in the encodeFileData method i have
BASE64Encoder enc64 = new BASE64Encoder();
byte[] bCert = wdThis.wdGetContext().currentCertFileElement().getFileData();
byte[] bKey = wdThis.wdGetContext().currentCertFileElement().getFileData();
String sCert = enc64.encode(bCert);
String sKey = enc64.encode(bKey);
BUT THAT CODE IS NOT EXECUTED cause i get the error just after the submit click and before the execution of the SubmitConfig action linked to the on action property of the button.
Did you already manage to solve this yourself?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.