java - How do you choose the filename of an uploaded file in ICEfaces? -


How do I choose the file name of an uploaded file with an ice in the ICEfaces: inputFile? The reason for this is that users can upload many files with the same name, without overwriting the server or generating errors.

I have tried to set the submitOnUpload feature of the tag to create "pre endpost upload" and to create an uploaded action listener for that tag which changes the file name of FileInfo of InputFile for an Unicode string is. If this file name tries to change pre-uploads, then it is ignored and the file is uploaded with the file name provided by the user. If this file-name tries to change the post-upload, I get a useless NullPointerException

JSF 1.2, IceFaces 1.8.2

Oh, I got it. Instead of calling FileInfo.setFileName, you want to call FileInfo.getFile (). Renameto ().


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -