struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance <lance.semm...@marketpipe.com>
Subject Re: Multiple upload using Struts 1.0
Date Wed, 30 May 2007 13:49:51 GMT
You should be right if you implement the 4 indexed bean methods on your 
form.
@see 
http://java.sun.com/j2se/1.4.2/docs/api/java/beans/IndexedPropertyDescriptor.html#IndexedPropertyDescriptor(java.lang.String,

java.lang.Class)

Here is an example if your property holding the files is called "files"

jsp:
<html:file property="files[0]" /> <!-- these may be build up in a for 
loop or something -->
<html:file property="files[1]" /> <!-- these may be build up in a for 
loop or something -->
<html:file property="files[2]" /> <!-- these may be build up in a for 
loop or something -->

form:
public class MyMultiFileForm {
    private List<FormFile> files = new ArrayList();

    // provide implementations for the following methods
    public List getFiles()
    public List setFiles()
    public FormFile getFiles(int index)
    public void setFiles(int index, FormFile file)
}

Vikash Manoranjan wrote:
> Hi all,
>  
> We have very urgent requirement for multipe file upload option using Struts
> 1.0. The number of files to be uploaded will be decided at run-time. Kindly
> help me. Its very urgent....
>  
> waiting for reply...
>  
>
> Thanks and Regards, 
>
> Vikash Manoranjan
>
> Senior Software Engineer
>
> Infotech Enterprises Limited 
> B-37, Sector-1, 
> Noida - 201301 
> Uttar Pradesh, India 
>
>  
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message