Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Upload Image File(Upload Image File)
Upload Image File [message #1744676] Thu, 29 September 2016 08:41 Go to next message
Eclipse UserFriend
Hi all,

I want to upload single image file then displaying it in a Control (Label ?). Then when user submits the form I want to save the file somewhere. I also want to be able to prevent user from uploading other file type.

From what I understand I can use FileUpload or FileDialog, but which one is the most suitable for this use case ?

Any advice would be greatly appreciated.

Thanks & Regards,
SetNug
Re: Upload Image File [message #1744911 is a reply to message #1744676] Sun, 02 October 2016 09:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi Team,

I've decided to use FileUpload widget, but I've faced another problem.

On FileUploadReceiver#receive I put some code to update Label widget with the uploaded image in UI thread within Display#syncExec. But the image won't get shown unless I click the label area or drag around the FormDialog that contains the Label.

Upon debugging I found that the execution halts forever at Display#syncExec and eventually at RunnableLock#wait in Synchronizer#syncExec.

Any help would be greatly appreciated.

Thanks & Regards,
SetNug
Re: Upload Image File [message #1744927 is a reply to message #1744911] Sun, 02 October 2016 22:54 Go to previous message
Eclipse UserFriend
I would use asyncExec if the calling thread doesn't need to block.

The updating issue sounds like you need to open a ServerPush session so the UI updates can be sent to the browser without a user performing an action. Have a look at org.eclipse.rap.rwt.service.ServerPushSession
Previous Topic:[ANN] RAP 3.1.1 Released
Next Topic:Testing RAP works via junit not via tycho => invalid thread acces (FIXED)
Goto Forum:
  


Current Time: Sun Jul 06 16:36:07 EDT 2025

Powered by FUDForum. Page generated in 0.03385 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top