myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zarick Lau" <zar...@gmail.com>
Subject [Trinidad] clearing 'inputFile' after PPR request
Date Mon, 17 Sep 2007 04:19:14 GMT
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

Mime
View raw message