I think what you want is to have the view have a IUploader
getIUploader() that returns MultipUploader.  The presenter will call
this and do .addOnFinishUploadHandler(onFinishUploaderHandler); where
onFinishUploaderHandler is in your presenter.


On Dec 13, 9:19 am, James Drinkard <jdrinka...@gmail.com> wrote:
> Hello All,
> I'm using a custom widget: gwtupload and I'm having trouble getting
> one of the handlers configured properly with uiBinder.  The regular
> implementation without uiBinder looks like this:
>
>  // Create a new uploader panel and attach it to the document
>     MultiUploader defaultUploader = new MultiUploader();
>     RootPanel.get("default").add(defaultUploader);
>
>     // Add a finish handler which will load the image once the upload
> finishes
>     defaultUploader.addOnFinishUploadHandler(onFinishUploaderHandler);
>   }
>
>   // Load the image in the document and in the case of success attach
> it to the viewer
>   private IUploader.OnFinishUploaderHandler onFinishUploaderHandler =
> new IUploader.OnFinishUploaderHandler() {
>     public void onFinish(IUploader uploader) {
>       if (uploader.getStatus() == Status.SUCCESS)
> ...
>
> Bascially, all the widgets and handlers I've used with uiBinder in the
> past used this in my viewImpl class:
> @UiField Button button;
>
> @UiHandler("button")
>         void onClick(ClickEvent e){
>     //Event handling here.
>
> }
>
> What I need is to reference a custom event handler implementation for
> an interface using onFinishUpload events as shown below from the API
> docs:
> Interface: IUploader.OnFinishUploaderHandler
> Method:  void onFinish(IUploader uploader)
> I tried using:
>
> @UiHandler ("uploaderWidget")
> void onFinish(IUploader uploader){}
>
> ,but since I don't have an implementation, uiBinder can't bind it
> properly. So I'm not clear how to implement the interface properly
> with uiBinder so that I can use the event?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to