Answered in stackoverflow, let me know if this solution works for you.
On Tue, Sep 30, 2014 at 11:38 AM, Tom <HenryHa5@gmail.com> wrote:
--I am using GWTUpload , the library is in here https://code.google.com/p/gwtupload/
The Example code at client side found on that website has this structure:
// Attach an image to the pictures viewer private OnLoadPreloadedImageHandler showImage = new OnLoadPreloadedImageHandler() { public void onLoad(PreloadedImage image) { //showImageFlowPanel code solution 1 image.setWidth("75px"); showImageFlowPanel.add(image); } }; private IUploader.OnFinishUploaderHandler onFinishUploaderHandler = new IUploader.OnFinishUploaderHandler() { public void onFinish(IUploader uploader) { if (uploader.getStatus() == Status.SUCCESS) { new PreloadedImage(uploader.fileUrl(), showImage); UploadedInfo info = uploader.getServerInfo(); String headShotImageUrl="http://"+Window.Location.getHost()+"/" +"images/uploaded/"+info.message; //headShotImage code solution 2 if(!"".equals(headShotImageUrl) && UriUtils.isSafeUri(headShotImageUrl)){ headShotImage.setUrl(UriUtils.fromString(headShotImageUrl)); } } } };The example uses
showImageFlowPanel(solution 1) to store the image but I want to store the image insideheadShotImagewhich take the url after user uploaded image successfully, see theheadShotImage(solution 2) code above.Ok, the headShotImage code work fine but I dont know how to remove it when users remove the image. If I use
showImageFlowPanelas in the solution 1 then the program remove the image automatically for me and I do not need to do anything.So my question is "Where to call an Action when user remove an uploaded image in GWTUpload?"
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment