0

私は以下の種類のhtmlを持っています

<html>
    <head>
        <title>Upload a file please</title>
    </head>
    <body>
        <h1>Please upload a file</h1>
        <form method="post" action="http://localhost:8080/service/uploadFile" enctype="multipart/form-data">
            <input type="text" name="name"/>
            <input type="file" name="file"/>
            <input type="submit"/>
            <input type="hidden" name="smallSize" value="50x50">
            <input type="hidden" name="mediumSize" value="100x100">
            <input type="hidden" name="largeSize" value="150x150">
        </form>
    </body>
</html>

Vaadin Upload を使用してそれを行いたいcomponentですか?どうすればこれを達成できますか?

4

3 に答える 3

0

私はhttps://vaadin.com/directory#addon/easyuploadsを使用しています。例:

final UploadField uploadField = new UploadField();
Button b = new Button("Show value");
b.addListener(new Button.ClickListener() {        
    public void buttonClick(ClickEvent event) {
        Object value = uploadField.getValue();
        mainWindow.showNotification("Value:" + value);
    }
});
于 2013-05-21T08:55:54.990 に答える