Actually,same thing can be done in uibinder's xml file,but question is
how to get selected file list:
-------------------------------------------------------------------------
private VerticalPanel vPanel;
public void onModuleLoad()
{
VerticalPanel wrapper = new VerticalPanel();
final FileUpload uploader = new FileUpload();
uploader.getElement().setPropertyBoolean("multiple", true);
wrapper.add(uploader);
wrapper.add(vPanel = new VerticalPanel());
uploader.addChangeHandler(new ChangeHandler()
{
@Override
public void onChange(ChangeEvent event)
{
String fileName = uploader.getFilename();
for (String file : fileName.split(","))
{
vPanel.add(new Label(file));
}
}
});
RootPanel.get().add(wrapper);
}
-----------------------------------------------------------------------------------
selected files will be list in file name box(you can see them if using
firefox),but FileUpload.getFileName() will get only first file name,and
further work is how to handle uploading?
On Mon, 2011-06-13 at 08:48 -0700, Thomas Broyer wrote:
> The issue is: what behavior do you expect on browsers that do not
> support this feature?
>
>
> In the mean time:
> fileUpload.getElement().setPropertyBoolean("multiple", true");
>
> --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/wV6toVIq388J.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to google-web-toolkit
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.