<hx:fileupload -- populate file name dynamically>

Hi,

I am using <hx:fileupload component in my JSF page. I am trying to populate file name dynamically and do not want users to browse for the file to locate.

JSF Code:

><hx:fileupload styleClass="fileupload" value="#{myBean.fileLocation}"

id="uploadFile">

<hx:fileProp name="fileName" value="#{myBean.myFile}" />

</hx:fileupload>

myBean.fileLocation returns something like c:\myfiles\

file name returns: testFile.txt

However, it is not prepopulating the file name.

I also tried myBean.fileLocation to return: c:\myfiles\testFile.txt and still it is not populating the file name.

<hx:fileupload styleClass="fileupload" binding="#{myBean.fileLocation}" also did not work.

Any help on how to populate file name dynamically will be very much appreciated.

I am using IBM RAD 6.0 Thanks in advance.>

[893 byte] By [MyJSFa] at [2007-11-27 10:57:29]
# 1

> Any help on how to populate file name dynamically

> will be very much appreciated.

This is considered a security risk and any browser that lets you do it is broken.

RaymondDeCampoa at 2007-7-29 12:09:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...