Closed GoogleCodeExporter closed 9 years ago
A new form is created for each new Uploader unless you provide an instance of
FormPanel, then Uploader adds the FileInput to this form.
MultiUploader does not have the option of providing customized forms, it
creates a new Form for each upload and removes the previous one when finishes.
Not sure what implies to change the behaviour. Nevertheless a workaround right
now is to add a statusChanged handler to the Multiuploader instance:
Final Widget w = new ...;
public void onStatusChanged( IUploader uploader ) {
if ( uploader.getStatus() == Status.CHANGED ) {
uploader.add(w);
}
}
Another option which is simpler is to add extra parameters to the query string
sent when uploading uploading.setServletPath("uploadServlet.gupld?id=whatever")
and get
this parameter in server side with request.getParameter("id").
Let me know if you have a patch for this feature, if not I'll schedule this for
a future release.
Original comment by manuel.carrasco.m
on 29 Dec 2010 at 7:36
Original comment by manuel.carrasco.m
on 29 Dec 2010 at 3:29
Was there a strategic reason MultiUploader doesn't allow for the specification
of a FormPanel via the constructor? That seems like a logical/useful fix for
it.
Original comment by ShieldsJ...@gmail.com
on 29 Dec 2010 at 8:36
The only one is the layout, when I created the widget I saw easier to add new
uploaders to the vertical panel.
Using the same FormPanel it should be necessary to detach and reattach it each
time.
Original comment by manuel.carrasco.m
on 30 Dec 2010 at 6:45
This issue was closed by revision r873.
Original comment by manuel.carrasco.m
on 22 Mar 2011 at 9:27
Reusing the form panel is a bit difficult since we need the panel for the
current upload, so as new ones can not use it until the submit has finished.
The solution I have selected, is to maintain a list with the widgets added, and
add all those widgets when the new form is submitted and before the old form is
removed.
Hidden field values are recalculated if their value match the input name
prefix. It is useful for php apc progress mechanism.
Nevertheless it is still possible to add/remove widgets in onStatusChanged if
the user wanted a different behavior.
Thank you for reporting
- Manolo
Original comment by man...@talkwheel.com
on 22 Mar 2011 at 10:25
Original issue reported on code.google.com by
ShieldsJ...@gmail.com
on 24 Nov 2010 at 4:07