You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@yahoo.com> on 2002/03/08 00:24:43 UTC

and keeping the value on errors

This might be considered off-topic, but here goes.

Does anyone have a solution for keeping the file path in a <input type="file">
rendered by a <html:file> tag?

I noticed with the Validator, it is not possible to validate the user has
selected a file.  Therefore, in my action class, I am extracting the filename,
and checking to see if it is blank.  If so, I route them back to the first
page, and tell them they need to select a file.

However, the file they selected is not in the field anymore.  I'm assuming this
is a browser thing, since I know you cannot set a value using javascript
(against security on this type of field).

Does anyone have a workaround for keeping the original value in the field?

Thanks,

Matt


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>