<s:file> is just an <input type="file">, not a text field and a browse button. There is no browser-independent way to control one part and not the other.

You may need to use a file upload library widget instead. Through browser detection they can obscure the text input so user's don't know it's there and can't tab to it, then add another read only text input that's populated via javascript. The technique is different for each browser so just use find a library to use. There isn't one included with Struts 2.

The readonly attribute of s:file is just the readonly attribute of all html input tags that makes the input readonly as opposed to disabled. I'm not sure it's even applied.

xianwinwin wrote:
I wonder what is the "readonly" for <s:file...>

I wish the user to specify the path only with the Browse button but will not
be able to change the path on field.
In other words, once the user has specified the path (by the browse) he will
not be able to change it directly from the textfield as in make changes
(s:file has a textfield)


I checked the properties of file on: http://struts.apache.org/2.x/docs/file.html

but didn't see any readonly.

does anyone know what will work for this case?

thank you!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to