Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » rap file dialog(problem in creatinf a file dialog)
rap file dialog [message #658144] Mon, 07 March 2011 05:40 Go to next message
marie Missing name is currently offline marie Missing nameFriend
Messages: 63
Registered: March 2011
Member
Hi all,
i m creating a rap application,but i m facing a problem while creating file dialog in my application,i have tried with file upload but it is not working with the same
FileDialog fileDialog = new FileDialog(getWorkbenchShell(), SWT.SAVE);
fileDialog.setFilterExtensions(new String[] {"*.xml"});

String xmlFilePath = null;

/* if named export file already exists in File System , display warning msg and depends
* upon user input proceed*/

do{
xmlFilePath = fileDialog.open();

if( xmlFilePath == null )
return false;

xmlFileDir = fileDialog.getFilterPath();
fileName = fileDialog.getFileName();

can anybody help me to resolve the problem.
thnak in advance

[Updated on: Mon, 07 March 2011 05:40]

Report message to a moderator

Re: rap file dialog [message #658295 is a reply to message #658144] Mon, 07 March 2011 17:52 Go to previous messageGo to next message
Austin Riddle is currently offline Austin RiddleFriend
Messages: 128
Registered: July 2009
Senior Member
Hi Mamta,

RAP currently does not have a FileDialog implementation.

We are working on one for the 1.4M6 release, but it will most likely be made available in a separate p2 repository than the core RAP bundles.
Re: rap file dialog [message #687723 is a reply to message #658295] Thu, 23 June 2011 03:57 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 3/7/2011 10:52 AM, Austin Riddle wrote:
> Hi Mamta,
> RAP currently does not have a FileDialog implementation.
>
> We are working on one for the 1.4M6 release, but it will most likely be
> made available in a separate p2 repository than the core RAP bundles.
>
Is there FileDialog available yet?
Re: rap file dialog [message #687764 is a reply to message #687723] Thu, 23 June 2011 06:29 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi John,
the FileDialog implementation is in incubator. Grab it from there.
Best,
Ivan

On 6/23/2011 6:57 AM, John Yotka wrote:
> On 3/7/2011 10:52 AM, Austin Riddle wrote:
>> Hi Mamta,
>> RAP currently does not have a FileDialog implementation.
>>
>> We are working on one for the 1.4M6 release, but it will most likely be
>> made available in a separate p2 repository than the core RAP bundles.
>>
> Is there FileDialog available yet?
Re: rap file dialog [message #687843 is a reply to message #687764] Thu, 23 June 2011 11:24 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

FYI,
there's now also an update site for the incubator. I just wrote a blog post about the new file upload features in RAP 1.4:

http://eclipsesource.com/blogs/2011/06/23/uploading-files-with-rap-14/

Best, Ralf
Re: rap file dialog [message #687943 is a reply to message #687843] Thu, 23 June 2011 14:47 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/23/2011 5:24 AM, Ralf Sternberg wrote:
> FYI,
> there's now also an update site for the incubator. I just wrote a blog
> post about the new file upload features in RAP 1.4:
>
> http://eclipsesource.com/blogs/2011/06/23/uploading-files-with-rap-14/
>
> Best, Ralf
Thanks!
Re: rap file dialog [message #688000 is a reply to message #687764] Thu, 23 June 2011 16:11 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/23/2011 12:29 AM, Ivan Furnadjiev wrote:
> Hi John,
> the FileDialog implementation is in incubator. Grab it from there.
> Best,
> Ivan
>
> On 6/23/2011 6:57 AM, John Yotka wrote:
>> On 3/7/2011 10:52 AM, Austin Riddle wrote:
>>> Hi Mamta,
>>> RAP currently does not have a FileDialog implementation.
>>>
>>> We are working on one for the 1.4M6 release, but it will most likely be
>>> made available in a separate p2 repository than the core RAP bundles.
>>>
>> Is there FileDialog available yet?

I provisioned the Target platform with the RAP Incubator, but still have
the issue with no package for the FileDialog. How do I update my (PDE)
eclipse with the Incubator FileDialog implementation?
Re: rap file dialog [message #688045 is a reply to message #688000] Thu, 23 June 2011 18:54 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi John,

Just create a new target platform and include these two software sites:
* http://download.eclipse.org/rt/rap/1.4/runtime
* http://download.eclipse.org/rt/rap/1.4/incubator

Then the bundle org.eclipse.rap.supplemental.filedialog will be available in your target platform.

Hope this helps, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: rap file dialog [message #688078 is a reply to message #688045] Thu, 23 June 2011 21:14 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/23/2011 12:54 PM, Ralf Sternberg wrote:
> Hi John,
>
> Just create a new target platform and include these two software sites:
> * http://download.eclipse.org/rt/rap/1.4/runtime
> * http://download.eclipse.org/rt/rap/1.4/incubator
>
> Then the bundle org.eclipse.rap.supplemental.filedialog will be
> available in your target platform.
>
> Hope this helps, Ralf
>
Ralf,

I created a new target platform from the above, along with the EMF + RAP
target, but the bundle was not found by eclipse. Attached are 2 jpegs,
one showing the target platform i've setup and the other the manual edit
I did to the manifest.mf (since the "Add..." buttons on the Dependencies
tab didn't show the bundle or package).
Re: rap file dialog [message #688088 is a reply to message #688078] Thu, 23 June 2011 22:15 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi John,

My fault, I had the namespace wrong in the bundle names. Actually it's
org.eclipse.rap.rwt.supplemental.filedialog! I've also corrected the bundle names in the blog post. Thanks for pointing out the problem.

I'm sorry for the confusion.

Best regards,
Ralf
Re: rap file dialog [message #688097 is a reply to message #688088] Thu, 23 June 2011 22:30 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/23/2011 4:15 PM, Ralf Sternberg wrote:
> Hi John,
>
> My fault, I had the namespace wrong in the bundle names. Actually it's
> org.eclipse.rap.rwt.supplemental.filedialog! I've also corrected the
> bundle names in the blog post. Thanks for pointing out the problem.
>
> I'm sorry for the confusion.
>
> Best regards,
> Ralf
>
Thanks again for your prompt help! I think the bundle name may actually
be: org.eclipse.rap.rwt.supplemental.fileupload. I found that in the
list and it solved my problem.
Re: rap file dialog [message #688507 is a reply to message #688097] Fri, 24 June 2011 20:24 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/23/2011 4:30 PM, John Yotka wrote:
> On 6/23/2011 4:15 PM, Ralf Sternberg wrote:
>> Hi John,
>>
>> My fault, I had the namespace wrong in the bundle names. Actually it's
>> org.eclipse.rap.rwt.supplemental.filedialog! I've also corrected the
>> bundle names in the blog post. Thanks for pointing out the problem.
>>
>> I'm sorry for the confusion.
>>
>> Best regards,
>> Ralf
>>
> Thanks again for your prompt help! I think the bundle name may actually
> be: org.eclipse.rap.rwt.supplemental.fileupload. I found that in the
> list and it solved my problem.

I spoke too soon, the compile errors went away, and I have these 2 jars

(C:\eclipse\workspaces\indigo\.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\plugins)
org.eclipse.rap.rwt.supplemental.filedialog_1.4.0.201106201014.jar
org.eclipse.rap.rwt.supplemental.fileupload_1.4.0.201106201014.jar
in my plug-in dependencies, but when I try to run the app I get the
following error:

!ENTRY com.datria.DVA.translatePrompts.editor 4 0 2011-06-24 14:15:08.766
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle
"com.datria.DVA.translatePrompts.editor_1.0.0.qualifier [116]" could not
be resolved. Reason: Missing Constraint: Import-Package:
org.eclipse.rap.rwt.supplemental.fileupload.internal; version="0.0.0"
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1327)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1311)

I don't understand this, since the jars exist and Eclipse shows that
they are in the .bundle_pool directory (in the "Plug-in Dependencies" in
the Package Explorer.
Re: rap file dialog [message #688710 is a reply to message #688507] Sat, 25 June 2011 12:43 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Did you include all needed jars in your launch config? Did you try to press "Verify" in the Run Configurations editor? What does a "ss" in your OSGi console give?
Re: rap file dialog [message #688762 is a reply to message #688710] Sat, 25 June 2011 16:06 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/25/2011 6:43 AM, Ralf Sternberg wrote:
> Did you include all needed jars in your launch config? Did you try to
> press "Verify" in the Run Configurations editor? What does a "ss" in
> your OSGi console give?
>
Thanks, I did a validate bundles and found the missing ones, the apache
ones.
Re: rap file dialog [message #689409 is a reply to message #688762] Mon, 27 June 2011 15:39 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/25/2011 10:06 AM, John Yotka wrote:
> On 6/25/2011 6:43 AM, Ralf Sternberg wrote:
>> Did you include all needed jars in your launch config? Did you try to
>> press "Verify" in the Run Configurations editor? What does a "ss" in
>> your OSGi console give?
>>
> Thanks, I did a validate bundles and found the missing ones, the apache
> ones.

Sorry Ralf but still having problems ...

Getting the NoClassDefFoundError, but the OSGI SS show the bundle as
active (#119). What am I missing? Application compiled with java 1.5,
if that makes a difference?


!ENTRY org.eclipse.rap.ui 4 0 2011-06-27 09:32:06.573
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/FileDialog
at
translatePrompts.presentation.TranslatePromptsEditorAdvisor.openFilePathDialog(TranslatePromptsEditorAdvisor.java:411)
at
translatePrompts.presentation.TranslatePromptsEditorAdvisor.openFilePathDialog(TranslatePromptsEditorAdvisor.java:402)
at
translatePrompts.presentation.TranslatePromptsEditorAdvisor$OpenURIAction.run(TranslatePromptsEditorAdvisor.java:389)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:575)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:492)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:403)
at
org.eclipse.swt.internal.widgets.UntypedEventAdapter.dispatchEvent(UntypedEventAdapter.java:652)
at
org.eclipse.swt.internal.widgets.UntypedEventAdapter.widgetSelected(UntypedEventAdapter.java:88)
at
org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:196)
at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:44)
at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:163)
at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:203)
at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1134)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1124)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2733)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2694)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:702)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:685)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
at
translatePrompts.presentation.TranslatePromptsEditorAdvisor$Application.start(TranslatePromptsEditorAdvisor.java:107)
at
org.eclipse.rap.ui.internal.application.EntrypointApplicationWrapper.createUI(EntrypointApplicationWrapper.java:27)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:73)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:211)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:88)
at java.lang.Thread.run(Thread.java:595)
at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
ss

Framework is launched.

id State Bundle
0 ACTIVE org.eclipse.osgi_3.7.0.v20110613
Fragments=74
58 ACTIVE org.eclipse.emf.ecore.edit_2.7.0.v20110606-0949
59 ACTIVE org.eclipse.rap.demo_1.4.0.20110614-2335
60 ACTIVE org.eclipse.rap.design.example_1.4.0.20110614-2335
61 ACTIVE com.datria.DVA.translatePrompts_1.1.0
63 ACTIVE org.eclipse.rap.ui.forms_1.4.0.20110614-2335
64 ACTIVE org.eclipse.emf.rap.common.ui_2.7.0.v20110606-0949
65 ACTIVE org.eclipse.rap.junit.runtime_1.4.0.20110614-2335
66 ACTIVE org.eclipse.equinox.http.jetty_2.0.100.v20110502
67 ACTIVE org.eclipse.emf.edit_2.7.0.v20110606-0949
70 ACTIVE org.eclipse.rap.demo.databinding_1.4.0.20110614-2335
71 ACTIVE org.eclipse.core.jobs_3.5.100.v20110404
72 ACTIVE org.eclipse.equinox.http.registry_1.1.100.v20110502
73 ACTIVE javax.servlet_2.5.0.v201103041518
74 RESOLVED
org.eclipse.equinox.servletbridge.extensionbundle_1.2.0.v20100503
Master=0
75 ACTIVE org.eclipse.equinox.registry_3.5.100.v20110502
76 ACTIVE org.eclipse.emf.ecore.change_2.7.0.v20110408-2116
77 ACTIVE org.eclipse.rap.jface_1.4.0.20110614-2335
78 ACTIVE org.eclipse.rap.rwt_1.4.0.20110614-2335
Fragments=104
79 ACTIVE org.eclipse.core.runtime_3.7.0.v20110110
80 ACTIVE org.eclipse.emf.ecore.xmi_2.7.0.v20110520-1406
81 ACTIVE org.eclipse.equinox.preferences_3.4.0.v20110502
82 ACTIVE org.eclipse.core.databinding.observable_1.4.0.I20110222-0800
83 ACTIVE org.mortbay.jetty.util_6.1.23.v201012071420
84 ACTIVE org.eclipse.core.databinding.property_1.4.0.I20110222-0800
85 ACTIVE org.mortbay.jetty.server_6.1.23.v201012071420
86 ACTIVE org.eclipse.rap.jface.databinding_1.4.0.20110614-2335
87 ACTIVE org.eclipse.emf.ecore_2.7.0.v20110605-0747
88 ACTIVE org.eclipse.core.commands_3.6.0.I20110111-0800
89 ACTIVE org.eclipse.rap.rwt.theme.classic_1.4.0.20110614-2335
90 ACTIVE org.eclipse.osgi.services_3.3.0.v20110513
91 ACTIVE org.eclipse.jdt.junit.runtime_3.4.300.v20110505-0800
92 ACTIVE org.eclipse.rap.ui.cheatsheets_1.4.0.20110614-2335
93 ACTIVE org.eclipse.equinox.app_1.3.100.v20110321
94 ACTIVE org.eclipse.core.databinding_1.4.0.I20110111-0800
95 ACTIVE com.ibm.icu.base_4.2.1.v20100412
96 ACTIVE org.eclipse.rap.ui.views_1.4.0.20110614-2335
97 ACTIVE org.eclipse.emf.common_2.7.0.v20110605-0747
98 ACTIVE org.eclipse.help_3.5.100.v20110426
99 ACTIVE org.eclipse.core.databinding.beans_1.2.100.I20100824-0800
100 ACTIVE org.eclipse.rap.junit_1.4.0.20110614-2335
101 ACTIVE org.eclipse.emf.rap_2.6.0.v20110606-0949
102 ACTIVE org.eclipse.core.expressions_3.4.300.v20110228
103 ACTIVE org.eclipse.rap.ui.workbench_1.4.0.20110614-2335
104 RESOLVED org.eclipse.rap.rwt.q07_1.4.0.20110614-2335
Master=78
105 ACTIVE org.eclipse.core.contenttype_3.4.100.v20110423-0524
106 ACTIVE org.eclipse.equinox.common_3.6.0.v20110523
107 ACTIVE org.junit_3.8.2.v3_8_2_v20100427-1100
108 ACTIVE org.eclipse.rap.ui_1.4.0.20110614-2335
109 ACTIVE org.eclipse.emf.ecore.change.edit_2.5.0.v20100521-1846
110 ACTIVE org.eclipse.emf.rap.edit.ui_2.7.0.v20110606-0949
111 ACTIVE org.eclipse.equinox.http.servlet_1.1.200.v20110502
118 ACTIVE com.datria.DVA.translatePrompts.editor_1.0.0.qualifier
119 ACTIVE
org.eclipse.rap.rwt.supplemental.filedialog_1.4.0.201106201014
120 ACTIVE org.eclipse.equinox.http.servletbridge_1.0.200.qualifier
121 ACTIVE
org.eclipse.rap.rwt.supplemental.fileupload_1.4.0.201106201014
122 ACTIVE org.apache.commons.io_1.3.2.201106201014
123 ACTIVE com.datria.DVA.translatePrompts.edit_1.1.0
124 ACTIVE org.apache.commons.fileupload_1.2.0.201106201014
125 ACTIVE org.eclipse.equinox.servletbridge_1.2.100.qualifier
Re: rap file dialog [message #689533 is a reply to message #689409] Mon, 27 June 2011 19:26 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi John,

No idea what your problem could be. What does the bundle manifest of the bundle that contains TranslatePromptsEditorAdvisor look like?

Ralf
Re: rap file dialog [message #689564 is a reply to message #689533] Mon, 27 June 2011 20:22 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/27/2011 1:26 PM, Ralf Sternberg wrote:
> Hi John,
>
> No idea what your problem could be. What does the bundle manifest of the
> bundle that contains TranslatePromptsEditorAdvisor look like?
>
> Ralf
>
here is the manifest.mf for the project containing
TranslatePromptsEditorAdvisor:


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.datria.DVA.translatePrompts.editor;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator:
translatePrompts.presentation.TranslatePromptsEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: translatePrompts.presentation
Require-Bundle: org.eclipse.core.runtime,
com.datria.DVA.translatePrompts.edit;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.core.commands;visibility:=reexport,
org.eclipse.rap.ui
Import-Package: org.apache.commons.fileupload;version="1.2.0",
org.apache.commons.fileupload.disk;version="1.2.0",
org.apache.commons.fileupload.portlet;version="1.2.0",
org.apache.commons.fileupload.servlet;version="1.2.0",
org.apache.commons.fileupload.util;version="1.2.0",
org.apache.commons.io;version="1.3.2",
org.apache.commons.io.filefilter;version="1.3.2",
org.apache.commons.io.input;version="1.3.2",
org.apache.commons.io.output;version="1.3.2",
org.eclipse.emf.common.ui,
org.eclipse.emf.common.ui.action,
org.eclipse.emf.common.ui.dialogs,
org.eclipse.emf.common.ui.editor,
org.eclipse.emf.common.ui.viewer,
org.eclipse.emf.edit.ui,
org.eclipse.emf.edit.ui.action,
org.eclipse.emf.edit.ui.celleditor,
org.eclipse.emf.edit.ui.dnd,
org.eclipse.emf.edit.ui.provider,
org.eclipse.emf.edit.ui.util,
org.eclipse.emf.edit.ui.view,
org.eclipse.jface.action,
org.eclipse.jface.dialogs,
org.eclipse.jface.operation,
org.eclipse.jface.viewers,
org.eclipse.jface.window,
org.eclipse.jface.wizard,
org.eclipse.rap.rwt.supplemental.fileupload,
org.eclipse.swt,
org.eclipse.swt.custom,
org.eclipse.swt.dnd,
org.eclipse.swt.events,
org.eclipse.swt.graphics,
org.eclipse.swt.layout,
org.eclipse.swt.widgets,
org.eclipse.ui;ui.workbench=split,
org.eclipse.ui.actions;ui.workbench=split,
org.eclipse.ui.application,
org.eclipse.ui.part;ui.workbench=split,
org.eclipse.ui.views,
org.eclipse.ui.views.contentoutline,
org.eclipse.ui.views.properties;ui.views=split
Bundle-ActivationPolicy: lazy
Re: rap file dialog [message #689702 is a reply to message #689564] Tue, 28 June 2011 08:06 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

As I explained in the blog post, I'd recommend using Require-Bundle for org.eclipse.rap.rwt.filedialog here. Because of the split-package, Import-Package will not work here.
Re: rap file dialog [message #689916 is a reply to message #689702] Tue, 28 June 2011 15:11 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/28/2011 2:06 AM, Ralf Sternberg wrote:
> As I explained in the blog post, I'd recommend using Require-Bundle for
> org.eclipse.rap.rwt.filedialog here. Because of the split-package,
> Import-Package will not work here.

Ralf, sorry I missed that, but I have updated the manifiest and still
get the same error (java.lang.NoClassDefFoundError:
org/eclipse/swt/widgets/FileDialog).

I've tried several variants of the manifest (with and without the
fileupload in the Required-Bundle).

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.datria.DVA.translatePrompts.editor;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator:
translatePrompts.presentation.TranslatePromptsEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: translatePrompts.presentation
Require-Bundle: org.eclipse.core.runtime,
com.datria.DVA.translatePrompts.edit;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.core.commands;visibility:=reexport,
org.eclipse.rap.rwt.supplemental.filedialog,
org.eclipse.rap.rwt.supplemental.fileupload,
org.eclipse.rap.ui
Import-Package: org.apache.commons.fileupload;version="1.2.0",
org.apache.commons.fileupload.disk;version="1.2.0",
org.apache.commons.fileupload.portlet;version="1.2.0",
Re: rap file dialog [message #690039 is a reply to message #689916] Tue, 28 June 2011 20:36 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

I'm sorry, John, I can't spot the problem. Sometimes a re-compile helps.

If not, what I would try next is to create a new Plug-in Project with an
simple snippet-like IEntryPoint implementation that contains a file
dialog. Add a bundle dependency to org.eclipse.rap.ui and to
org.eclipse.rap.rwt.supplemental.filedialog.

If this works, the problem must be in your code. If it does not, then
maybe there's something wrong in your target...

HTH, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: rap file dialog [message #690562 is a reply to message #690039] Wed, 29 June 2011 17:34 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/28/2011 2:36 PM, Ralf Sternberg wrote:
> I'm sorry, John, I can't spot the problem. Sometimes a re-compile helps.
>
> If not, what I would try next is to create a new Plug-in Project with an
> simple snippet-like IEntryPoint implementation that contains a file
> dialog. Add a bundle dependency to org.eclipse.rap.ui and to
> org.eclipse.rap.rwt.supplemental.filedialog.
>
> If this works, the problem must be in your code. If it does not, then
> maybe there's something wrong in your target...
>
> HTH, Ralf
>
I haven't yet solved the issue running in my PDE environment, but was
able to successfully deploy this app as a WAR and the FileDialog does
come up. But after selecting a file on the server, the returned name of
the file is a temp name, e.g., "upload.49572.tmp" and not the name of
the selected file. What am I doing wrong?
Re: rap file dialog [message #690795 is a reply to message #690562] Thu, 30 June 2011 08:34 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi John,

this is an issue of the current FileDialog implementation. It has
already been discussed in the comments of this blog post:
http://eclipsesource.com/blogs/2011/06/23/uploading-files-with-rap-14/

We are willing to fix it as soon as possible. Would you like to create a
bug report in our bugzilla to keep track of the issue?

Best regards, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: rap file dialog [message #691077 is a reply to message #690795] Thu, 30 June 2011 16:30 Go to previous messageGo to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
On 6/30/2011 2:34 AM, Ralf Sternberg wrote:
> Hi John,
>
> this is an issue of the current FileDialog implementation. It has
> already been discussed in the comments of this blog post:
> http://eclipsesource.com/blogs/2011/06/23/uploading-files-with-rap-14/
>
> We are willing to fix it as soon as possible. Would you like to create a
> bug report in our bugzilla to keep track of the issue?
>
> Best regards, Ralf
>
Ralf,

I created a report (bug 350857).

But my problem my be something different. What I was looking for was a
FileDialog that behaves as the current SWT FileDialog behaves, that is
it returns the full path (URI) of the selected files, it doesn't upload
anything. I might rename your FileDialog to FileUploadDialog, since
that is the purpose of it.

I can probably use your code example to accomplish what I need but I
don't know how to obtain the full path (URI) from the FileUpload
(browseButton in UploadPanel). Presently it only returns the file name
(+ext).
Re: rap file dialog [message #691097 is a reply to message #691077] Thu, 30 June 2011 17:26 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi John,

> I created a report (bug 350857).

Thanks for the bug report!

> But my problem my be something different. What I was looking for was a
> FileDialog that behaves as the current SWT FileDialog behaves, that is
> it returns the full path (URI) of the selected files, it doesn't upload
> anything.

Unfortunately, you cannot determine the full path of a selected file on
the client. Only a few browsers provide the path information (IE, Opera,
IIRC).

If you're only interested in the file names, use the new FileUpload
widget. This widget lets the user select a file from the local file
system. Although its purpose is to upload files, you can also use it
just to listen to a file selection (simply add a SelectionListener).

> I might rename your FileDialog to FileUploadDialog, since that
> is the purpose of it.

It's named FileDialog because it implements an existing SWT API and thus
allows for code re-use.

> I can probably use your code example to accomplish what I need but I
> don't know how to obtain the full path (URI) from the FileUpload
> (browseButton in UploadPanel). Presently it only returns the file name
> (+ext).

Yes, see above.

Best regards, Ralf

--
Ralf Sternberg

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:rap file dialog
Next Topic:Indigo (3.7M5) + RAP - batik & w3c missing
Goto Forum:
  


Current Time: Wed Dec 08 20:32:34 GMT 2021

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

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

Back to the top