Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Upload Image File(Upload Image File)
Upload Image File [message #1744676] Thu, 29 September 2016 12:41 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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 13:04 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
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] Mon, 03 October 2016 02:54 Go to previous message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
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: Thu Apr 25 17:38:53 GMT 2024

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

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

Back to the top