Calling ClientContext.storeFile when my application is in the servlet
environment is not producing the same results as within the standalone
environment. The dialog title is not set, the file name is not set,
and the filePath passed back by onSuccess is null.
Jave Web Start Security?
My first guess was that instead of signing all the client jars, I
would follow the deployment guide by including the
ulc-base-trusted.jar and just sign it. I received different security
warning ings, but the above problems persist.
Any ideas? Here is the relevant code:
FileChooserConfig config = new FileChooserConfig();
config.setDialogTitle("Where would you like to save the report?");
config.setFileSelectionMode(FileChooserConfig.FILES_ONLY);
config.setDialogType(FileChooserConfig.SAVE_DIALOG);
config.setSelectedFile(file.getFilename());
try{
ClientContext.storeFile(new IFileStoreHandler(){
public void prepareFile(OutputStream outputStream) throws Exception {
FileCopyUtils.copy(file.getInputStream(), outputStream);
}
public void onSuccess(String filePath) {
log.info("chose file success, file: {}", filePath);
ClientContext.showDocument(filePath);
}
public void onFailure(int reason, String description) {
log.info("chose file failure"); // e.g. cancel button pressed
}
}, config, this);
} catch(Exception e){
log.error("problem saving report", e);
}
thanks,
Cameron
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer