You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Reza Aliakbari <Re...@pdpsoft.com> on 2002/11/18 13:29:25 UTC

Assigning an object(FormFile) to a dynamic form.

Hi,
 
I use dynamic forms in my projects; but this time I want to upload
A file and when I use   <form-property name="myFile"
type="org.apache.struts.upload.FormFile" /> 
An error occurs that says that cannot assign String to FormFile.
How can I use dynamic form with this kind of objects?
 
Thanks, reza.
 

Re: Assigning an object(FormFile) to a dynamic form.

Posted by Martin Cooper <ma...@apache.org>.

On Mon, 18 Nov 2002, Reza Aliakbari wrote:

> Hi,
>
> I use dynamic forms in my projects; but this time I want to upload
> A file and when I use   <form-property name="myFile"
> type="org.apache.struts.upload.FormFile" />
> An error occurs that says that cannot assign String to FormFile.
> How can I use dynamic form with this kind of objects?

FormFile is an interface, so it can't be instantiated. Try using DiskFile
instead - it implements FormFile.

--
Martin Cooper


>
> Thanks, reza.
>
>


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