2006/12/12, PS ps <email@hidden>:
Hi,
We are using WOFileUpload to accept files in our
application.
After a post (clicking on the submit button), page is
redisplayed with
any validate errors.
At this point, even though all the other fields still
display the data
that was entered, the WOFileUpload field doesn't
retain the file name.
Any way to ensure that the filename stays in the
field?
Hi, I think the easiest way to do this is to add 2 methods to your java file:
public String uploadedFilePath;
public String uploadedFilePath()
{
return uploadedFilePath;
}
public void setUploadedFilePath(String newUploadedFilePath)
{
uploadedFilePath = newUploadedFilePath;
}
and to your .woo file bind:
FileUpload: WOFileUpload {
size = "20";
filePath = uploadedFilePath;
streamToFilePath = newPath;
}
now you can try to setUploadedFilePath(), in the appendToResponse() method... this should work
Bye,