Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RWT FileDialog (without RAP)
RWT FileDialog (without RAP) [message #884629] Mon, 11 June 2012 14:13 Go to next message
M L is currently offline M LFriend
Messages: 5
Registered: June 2012
Junior Member
Hi!

I want to create a simple FileDialog with just RWT, but without RAP. So if I call "fileDialog.open" I get the following error message:

Problem accessing /rap. Reason:

The SimpleLifeCycle does not support Display#sleep().

This is cause by FileDialog#runEventLoop(shell). How can I skip this? Please help me! Thanks
Re: RWT FileDialog (without RAP) [message #884876 is a reply to message #884629] Tue, 12 June 2012 02:04 Go to previous messageGo to next message
ZungNV Abel is currently offline ZungNV AbelFriend
Messages: 16
Registered: November 2010
Junior Member
Hi,
As I see your problem, you want to show a simple FileDialog like in SWT to just choose file and get its path?
If so, in RWT currently have no such widget.
You might find out some useful information via these links:

eclipsesource .com/blogs/2011/06/23/uploading-files-with-rap-14/
wiki .eclipse.org/RAP/Incubator/File_Upload

Best regards,

[Updated on: Tue, 12 June 2012 02:04]

Report message to a moderator

Re: RWT FileDialog (without RAP) [message #885008 is a reply to message #884629] Tue, 12 June 2012 09:00 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
when you are using JEE Compatibility mode you must open your dialogs in
a non blocking way - use DialogUtil#open( Dialog dialog, DialogCallback
dialogCallback ) instead of Dialog#open.
HTH,
Ivan

On 6/11/2012 5:13 PM, M L wrote:
> Hi!
>
> I want to create a simple FileDialog with just RWT, but without RAP.
> So if I call "fileDialog.open" I get the following error message:
>
> Problem accessing /rap. Reason:
> The SimpleLifeCycle does not support Display#sleep().
>
> This is cause by FileDialog#runEventLoop(shell). How can I skip this?
> Please help me! Thanks
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RWT FileDialog (without RAP) [message #885553 is a reply to message #885008] Wed, 13 June 2012 08:37 Go to previous messageGo to next message
M L is currently offline M LFriend
Messages: 5
Registered: June 2012
Junior Member
Thanks for your reply!
But if i use DialogUtil#open the selection of a file then will be ignored (System.out.println(fileDialog.open()) --> null).
Re: RWT FileDialog (without RAP) [message #886083 is a reply to message #885553] Thu, 14 June 2012 08:09 Go to previous messageGo to next message
M L is currently offline M LFriend
Messages: 5
Registered: June 2012
Junior Member
Ok now I'v fixed this problem. Currently I'm using the UploadPanel to upload a file, but it seems that the UploadEvent is never triggered? Any ideas?
Re: RWT FileDialog (without RAP) [message #886413 is a reply to message #886083] Thu, 14 June 2012 21:51 Go to previous messageGo to next message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Hi M L,

Are you using the FileDialog implementation that is in the incubator or are you using the deprecated sandbox Upload widget? There is no UploadEvent in the incubator version, only FileUploadEvent. And the UploadPanel is an internal class.

If you are using the dialog from the incubator, then you should have the org.eclipse.rap.rwt.supplemental.fileupload bundle also running in your application (since it is a dependency on the FileDialog bundle).
Have you confirmed that the file is being uploaded?
Re: RWT FileDialog (without RAP) [message #886585 is a reply to message #886413] Fri, 15 June 2012 08:24 Go to previous messageGo to next message
M L is currently offline M LFriend
Messages: 5
Registered: June 2012
Junior Member
I've tried with the FileDialog but also with only the FileUpload widget and only the UploadPanel. But it seems that the the file is not uploaded at all. In the browser the green progressbar stops at round about 30%. How can I check if the FileUploadEvent is triggered??

I've used this code but nothing happens...
uploadHandler.addUploadListener(new FileUploadListener()
{
public void uploadProgress(FileUploadEvent event)
{
// handle upload progress
System.out.println("here");

}

public void uploadFailed(FileUploadEvent event)
{
addToLog("upload failed: " + event.getFileName());
}

public void uploadFinished(FileUploadEvent event)
{
addToLog("received: " + event.getFileName());
}
});

I'm working with RWT standalone and Maven. I've added the filupload-bundle to the dependency part in the pom.xml.
Re: RWT FileDialog (without RAP) [message #888569 is a reply to message #884629] Mon, 18 June 2012 09:50 Go to previous message
M L is currently offline M LFriend
Messages: 5
Registered: June 2012
Junior Member
Problem solved. Some JAR-files were missing Confused
Previous Topic:Displaying static HTML content
Next Topic:CSS Tree-Cell padding not working properly on right aligned columns
Goto Forum:
  


Current Time: Thu Mar 28 20:15:41 GMT 2024

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

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

Back to the top