There's two concepts here: 1. The object being iterated by the AjaxFormLoop 2. The UploadedFile property binding
1 can't be null, 2 can be null (in onAdd). I'd probably create a wrapper bean for the iteration and use a custom ValueEncoder. eg: http://tinyurl.com/nx895tw On 8 Sep 2014 09:14, "squallmat ." <squall...@gmail.com> wrote: > Hi Lance, Thanks for your answer. > I tried to use a null value, but when trying to "onAdd" I got : > > Event handler for event 'addRow' from NouvelApplicatif:docfiles should have > returned a non-null value. > > > So it seems you can't use a null value. I need to do a list of dynamic > (add/remove) upload files and if I can't instantiate them in the controller > code I don't see how I can do it. Any suggestion ? > > 2014-09-07 12:22 GMT+02:00 Lance Java <lance.j...@googlemail.com>: > > > The UploadedFile is instantiated by tapestry when the form is posted so > it > > should be OK to bind to a null property for "onAdd". > > On 7 Sep 2014 02:50, "squallmat ." <squall...@gmail.com> wrote: > > > > > Hi, > > > > > > I'm trying to put dynamic multiple upload buttons in Tapestry with an > > > AjaxFormLoop component. > > > > > > But in the "onAdd" event where you have to create a new UploadedFile > > Object > > > and return it, it doesn't seems to have any method to do that, because > > > UploadedFile can't be instantiated by a new. > > > Is there a way to instantiate dynamically, in the java class of my > .tml, > > a > > > new UploadedFile ? > > > > > > Or is there another way to achieve what I want ? > > > > > >