Customise upload button

42 views
Skip to first unread message

Thomas Buckel

unread,
May 16, 2015, 6:44:22 AM5/16/15
to gwtu...@googlegroups.com
Hi all,

Recently upgraded to GWTUpload v1.0.1 and it seems I'm unable to customise the Upload button anymore.

My code looks like:

        uploader = new MultiUploader(IFileInput.FileInputType.BUTTON.with(wrapper));

Where wrapper is an instanceof:
    private static class ButtonDecorator extends SimplePanel implements HasClickHandlers {

        private final Button button;

        private ButtonDecorator(Button button) {
            super(button);
            this.button = button;
        }

        @Override
        public HandlerRegistration addClickHandler(ClickHandler clickHandler) {
            return button.addClickHandler(clickHandler);
        }
    }

It also doesn't work if I omit the wrapper:
        uploader = new MultiUploader(IFileInput.FileInputType.BUTTON);

The only way I get it to work is using MultiUploader's default constructor which results in an ugly default button:
        uploader = new MultiUploader();

Any ideas appreciated.

Cheers,
Thomas

Thomas Buckel

unread,
May 17, 2015, 12:07:13 AM5/17/15
to gwtu...@googlegroups.com
Solved it. v1.0.1 seems to be broken, works with v1.0.3.
Reply all
Reply to author
Forward
0 new messages