Q:

GWTUploader add file on start

I use gwtupload (http://code.google.com/p/gwtupload/) and I need add on start files to this. Someone know how can I do it ?

A:

I can deduce that you want to add previously uploaded files to the multiuploader list.
There is no way with the current MultiUploader  although you can open a ticket at the project site, and I will implement it on a next release.
But you can extend the MultiUploader and code a workaround, this example works:
public class GwtTestApp implements EntryPoint {

  public void onModuleLoad() {
    MyMultiUploader uploader = new MyMultiUploader("file1.txt", "file2.doc");
    RootPanel.get().add(uploader);
  }

  public static class MyMultiUploader extends MultiUploader {

    private VerticalPanel panel;
    private Widget multiuploader;

    @Override
    protected void initWidget(Widget widget) {
      panel = new VerticalPanel();
      super.initWidget(panel);
      multiuploader = widget;
    }

    public MyMultiUploader(String ...files) {

      for (String f : files ) {
        Uploader u = (Uploader)getUploaderInstance();
        IFileInput i = u.getFileInput();
        IUploadStatus s = u.getStatusWidget();

        i.setVisible(false);
        s.setVisible(true);
        u.getForm().removeFromParent();

        u.setServletPath("whatever");
        s.setFileName(f);
        s.setStatus(Status.SUCCESS);

        final String name = f;
        s.addCancelHandler(new UploadCancelHandler() {
          public void onCancel() {
            Window.alert("Cancel " + name);
          }
        });

        panel.add(u);
      }

      panel.add(multiuploader);
    }

  }

}

