Note that there are some explanatory texts on larger screens.

plurals
  1. POgwtupload input type costum
    text
    copied!<p>I using the gwtupload libary to change the upload view of my application. I want to implement basically the same as in this example <a href="http://gwtupload.alcala.org/gupld/gwtuploadsample.SingleUploadSample/SingleUploadSample.html" rel="nofollow">"Single uploader using a customizable button..."</a>. Therefore I'm having a custom button class:</p> <pre><code>public class CostumButton extends Composite implements HasClickHandlers { DecoratorPanel widget; public CostumButton() { widget = new DecoratorPanel(); initWidget(widget); widget.setStyleName("costum-Button"); widget.setSize("100%","100%"); } public HandlerRegistration addClickHandler(ClickHandler handler) { return addDomHandler(handler, ClickEvent.getType()); } } </code></pre> <p>and a FileUploadFormImplDefault:</p> <pre><code>// new costum button CostumButton button = new CostumButton(); // Create a FileUpload widget. fileUpload = new SingleUploader(FileInputType.CUSTOM.with(button)); fileUpload.setTitle("costumFileUpload"); fileUpload.getWidget().setSize("100%", "50px"); RootPanel.get().add(fileUpload); </code></pre> <p>my css file: </p> <pre><code>.base-Button:active { position:relative; top:1px; border: none; } .costum-Button { cursor: pointer; background-color: green; background-image: url("resources/img/button_upload0.png"); } .custom-Button:hover { background-image: url("resources/img/button_upload0_hover.png"); } </code></pre> <p>everything is loaded with an upload view:</p> <pre><code>uploadForm = new FileUploadFormImplCostum(actionUrl); add(uploadForm); </code></pre> <p>When I start my application (in debug mode) nothing is shown. I try to debug it with the chrome debug mode, but no evidence from my costume form. Not quite sure why. thx for any help.</p> <p>//EDIT: Fixed a few things know I'm having my custom button and per <em>setAutoSubmit(true);</em> I disabled the "Send/submit" button. Disabling works fine, but it is just invisible so it is there and takes space away which is a problem because my uploader is within another Panel and know I can not center it because it's center with the submit button. So how can I delete or overlap the button. css? thx :)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload