Immediate Upload with Icon

Hi,

I wanted to create an upload, which is visible just as an icon.
So I set the upload too immediate=true and added the Icon via setIcon(…) .

Problem: The icon is not shown in the Button, it is over the left corner of the Button, and the icon is not clickable.

Because I just want to see the icon, I added setButtonCaption(null) and only the icon is displayed, but it is also not clickable.

Any Ideas?

I also opened a Tickt for this issue: http://dev.vaadin.com/ticket/12585

But nobody an idea or a workaround?

I don’t personally think the icon should be clickable because if you think about an icon on a non-immediate upload component it shouldn’t be clickable either.
What you should do instead is to modify the upload button using css.
So modify the css class: .youruploadclass .v-button

This issue seem to bug some developers, so I created UploadButton add-on that behaves more like button, which is probably liked by those who use the Upload in immediate mode, and want to Icon and Caption behave like in Button, also it adds support for HTML in button caption.

https://vaadin.com/directory/component/uploadbutton-add-on