Dear Users and Developers,
I've used tr:inputFile with PPR with success, however, after PPR
request is completed, the HTML form still leave the last file path
in the <input type="file" /> control.
When user finally submit the form, the backing bean will
get another file, which are actually processed in last PPR request.
I've tried the following code:
public void onNewFileChange(ValueChangeEvent event) {
UploadedFile file = (UploadedFile) event.getNewValue();
log.debug("onNewFileChange: " + file);
if (file != null && file.getLength() > 0) {
setNewFile(file);
}
((CoreInputFile)event.getComponent()).setValue(null);
((CoreInputFile)event.getComponent()).setLocalValueSet(true);
}
But this doesn't work as expected.
How can I reset that input box?
Best regards,
Zarick Lau