cornerli / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

Widgets are not uiBinder friendly #151

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Manuel,
      I used this library and I would like to first appreciate your work and would like to say thanks for such a useful library.

      In this ticket I am just suggesting few enhancement. As being such good library it will add some more perfection to it.

      When I say widgets are not uiBinder friendly. I suppose we cannot add the widget like SingleUploader through uiBinder by setting its parameters like FileInputType or cannot nest IUploadStatus widget inside SingleUploader tag or cannot nest any other custom widget to act like submitButton. Please correct me if I am wrong.

      Again these are just enhancement suggestions. Any body who want to use it that way can extend the existing functionality and add the required mechanism. And if you require any help I am open for possible contribution from myside.

Thanks once again
-Pandurang Patil.

Original issue reported on code.google.com by panduran...@gmail.com on 26 May 2012 at 6:09

GoogleCodeExporter commented 8 years ago
does this example work for you?
http://code.google.com/p/gwtupload/source/browse/trunk/GwtUpload/samples/src/mai
n/java/gwtuploadsample/client/MUpld.ui.xml?r=878

Original comment by manuel.carrasco.m on 30 May 2012 at 11:28

GoogleCodeExporter commented 8 years ago
Hi Manuel,
   Thanks for pointing to the sample example that would be very helpful actually I didn't look at the code of yours. So I was looking for property setters to set the value for different property and I didn't find any property through which one can set FileInputType I made some assumptions. 

   If I need to add custom status bar widget through ui.xml how should I do it? 

Thanks,
-Pandurang Patil.

Original comment by panduran...@gmail.com on 8 Jun 2012 at 4:13

GoogleCodeExporter commented 8 years ago
You can select predefined FileInputTypes in the ui.xml using the type attr.
<up:MultiUploader type="LABEL" ui:field="uploader" ...

If you want anyother IFileInput implementation you have to do in the 
construnctor of your .java file:
uploader.setFileInput(myfileinput)

The same with the IUploadStatus:
uploader.setStatusWidget(mystatusbar)

I think most people dont use ui.xml to customize uploaders, so I have not spend 
so much time to support every single property to be available via uibinder, 
since the user has the option to customize via java code.

Anyway if you can send me a patch I'll include your code with pleasure.

- Manolo

Original comment by manuel.carrasco.m on 11 Jun 2012 at 6:40

GoogleCodeExporter commented 8 years ago
Hi Manuel,
     Sorry for replying late. I was away from my machine for some time, because of which I was not able to reply. You need to add following method inside your gwt fileupload class.

    @UiChild(limit = 1)
    public void addStatusBar(IUploadStatus status) {
        this.setStatusWidget((IUploadStatus) status);
    }
For more details on uichild annotation. 
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/uibinder
/client/UiChild.html

Original comment by panduran...@gmail.com on 19 Jun 2012 at 2:23

GoogleCodeExporter commented 8 years ago

Original comment by manuel.carrasco.m on 3 Dec 2012 at 11:46

GoogleCodeExporter commented 8 years ago
This issue was closed by revision b43b8e4bfc7d.

Original comment by manuel.carrasco.m on 3 Dec 2012 at 11:47