I need to give it a Model that holds a collection so I did something like
this

Model mode = new Model()
{
    Object getObject()
    {
        Collection holder = new ArrayList();
        return holder;
    }

}


Then I do this.

MultiFileUploadField ff=new MultiFileUploadField("file_input",model,3);

Still it gives problems. I still dont know how will I get a handle on all
the files I have added.
Please correct me if I am wrong somewhere


Again this is a MultiFileUploadField in a ListView which is on a From. I
just want to know where should I define my collections. Should be on the
Page or Form or somewhere else.

Thanks,
Franklin.




Johan Compagner wrote:
> 
> you could try with a simpler model? and see if that works? (so just new
> Model())
> 
> On Nov 13, 2007 8:22 AM, Franklin Antony <[EMAIL PROTECTED]> wrote:
> 
>>
>> Thanks Igor but it doesnt seem to work still.
>>
>> Just some more hints:
>>
>> I have the listview on a form and the form is on the page.
>> The uploads collection object is on the form.
>> It keeps telling me that there is no such uploads object on the page and
>> so
>> I changed the call from
>>
>> MultiFileUploadField ff=new MultiFileUploadField("file_input",new
>> PropertyModel(this,"uploads"),3);
>>
>> to
>>
>> MultiFileUploadField ff=new MultiFileUploadField("file_input",new
>> PropertyModel(MyForm.this,"uploads"),3);
>>
>> Still doest work.
>>
>>
>> So now i add the collections uploads directly to the page and make call
>> like
>> this
>>
>>
>> MultiFileUploadField ff=new MultiFileUploadField("file_input",new
>> PropertyModel(MyPage.this,"uploads"),3);
>>
>> Now there is some light in this direction. Only the last set of files in
>> the
>> listview go inside the uploads collection.
>>
>>
>> I really wish if someone could shed some light on this. Wicket has been
>> so
>> easy to use up to now. But I am getting confused with how it will handle
>> the
>> model in case of reapeaters. I need all the repeaters to use the same
>> collections object.
>>
>>
>> Thanks for all the help Igor,
>> Franklin
>>
>>
>>
>> igor.vaynberg wrote:
>> >
>> > did you call listview.setreuseitems(true)
>> >
>> > it is usually easier if you provide a quickstart...
>> >
>> > -igor
>> >
>> >
>> > On Nov 12, 2007 7:28 AM, Franklin Antony <[EMAIL PROTECTED]>
>> wrote:
>> >>
>> >> Dear Friends,
>> >>    I am having a problem with putting MultiFileUploadField inside a
>> >> ListView. I am following the example, but somehow the uploads
>> collection
>> >> is
>> >> not getting populated with the files. However when I directly add the
>> >> MultiFileUploadField  on a form everything seems to work. Could
>> someone
>> >> please shed some light on this.
>> >>
>> >> Here is some code snippet
>> >>
>> >>             List ls = Arrays.asList(new String[]{"Passport "});
>> >>             ListView pl = new ListView("plist",ls)
>> >>             {
>> >>
>> >>                                 protected void populateItem(ListItem
>> >> arg0) {
>> >>
>> >>
>> >>                                         MultiFileUploadField ff=new
>> >> MultiFileUploadField("file_input",new
>> >> PropertyModel(this,"uploads"),3);
>> >>
>> >>                                         fileUploadList.add(ff);
>> >>                                         fileUpload.add(ff);
>> >>                         arg0.add(ff);
>> >>
>> >>
>> >>
>> >>
>> >>                                 }
>> >>
>> >>
>> >>             };
>> >>
>> >>
>> >> And the listview is on a form and the collections(uploads) is on the
>> form
>> >> to
>> >> just as in the example. I am sure its something with the component
>> >> hierarchy. But not sure how to call the uploads correctly. I think
>> there
>> >> is
>> >> something wrong with the expression.
>> >>
>> >>
>> >> Thanks,
>> >> Franklin
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13707621
>> >> Sent from the Wicket - User mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13720963
>>  Sent from the Wicket - User mailing list archive at
>> Nabble.com<http://nabble.com/>
>> .
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multi-file-upload-and-ListView-together-tf4791788.html#a13722270
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to