Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Upload Widget in a RAP environment without OSGi
Upload Widget in a RAP environment without OSGi [message #107335] Wed, 01 October 2008 03:30 Go to next message
Eclipse UserFriend
Originally posted by: Holger.Liedtke.lessing-irm.de

Hi!

As already mentioned, I've a RAP application running on JBoss without the
OSGi environment. Everything works fine except for the upload widget. Is
there anything special I have to do?
The error I got message is:
Could not evaluate javascript response:

TypeError: org.eclipse.rwt.widgets.Upload is not a constructor

org.eclipse.swt.EventUtil.suspendEventHandling();var req =
org.eclipse.swt.Request.getInstance();req.setRequestCounter( "35" );var wm =
org.eclipse.swt.WidgetManager.getInstance();var w = wm.newWidget( "w390",
"w12", true, null, 'qx.ui.layout.CanvasLayout' );w.setOverflow(
"hidden" );w.setHideFocus( true );w.setAppearance(
"composite" );w.setSpace( 0, 0, 0, 0 );w.setZIndex( 299 );var w =
wm.newWidget( "w391", "w390", true, null, 'org.eclipse.rwt.widgets.Upload',
'" https://localhost:8443/enrisma/risk?custom_service_handler=o rg.eclipse.rwt.widgets.upload.servlet.FileUploadServiceHandl er&widgetId=3149782",
2' );w.setAppearance( "composite" );w.setOverflow( "hidden" );w.setSpace( 0,
0, 0, 0 );w.setZIndex( 300 );w.setLastFileUploaded(
"" );w.setBrowseButtonText( "Browse" );w.setUploadButtonText( "Upload" );var
w = wm.newWidget( "w386", "", false, null,
'org.eclipse.swt.widgets.Shell' );w.addToDocument();w.addState(
"rwt_BORDER" );w.addState( "rwt_APPLICATION_MODAL" );w.addState(
"rwt_TITLE" );w.setShowMinimize( false );w.setAllowMinimize(
false );w.setShowMaximize( true );w.setAllowMaximize(
true );w.setShowClose( true );w.setAllowClose( true );w.setResizable( true,
true, true, true );w.setParentShell( wm.findWidgetById(
"w12" ) );w.initialize();w.addEventListener( "changeWidth",
org.eclipse.swt.EventUtil.widgetResized );w.addEventListener(
"changeHeight",
org.eclipse.swt.EventUtil.widgetResized );w.addEventListener( "changeLeft",
org.eclipse.swt.EventUtil.widgetMoved );w.addEventListener( "changeTop",
org.eclipse.swt.EventUtil.widgetMoved );w.setSpace( 731, 218, 381,
93 );w.setVisibility( true );w.open();w.setActive(
true );w.setHasShellListener( true );var w = wm.newWidget( "w383", "w386",
true, null, 'qx.ui.layout.CanvasLayout' );w.setOverflow(
"hidden" );w.setHideFocus( true );w.setAppearance(
"composite" );w.setSpace( 1, 212, 20, 69 );w.setZIndex( 300 );var w =
wm.newWidget( "w387", "w383", true, null,
'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
true );w.setAppearance( "composite" );w.setSpace( 0, 212, 0,
22 );w.setZIndex( 300 );var w = wm.newWidget( "w388", "w383", true, null,
'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
true );w.setAppearance( "composite" );w.setSpace( 0, 212, 22,
47 );w.setZIndex( 299 );wm.setFont( w, [ "Segoe UI", "Corbel", "Calibri",
"Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, false, false );var w =
wm.newWidget( "w389", "w388", true, null,
'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
true );w.setAppearance( "composite" );w.setSpace( 0, 212, 0,
47 );w.setZIndex( 300 );wm.setFont( w, [ "Segoe UI", "Corbel", "Calibri",
"Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, false, false );var w =
wm.newWidget( "w384", "w389", true, null,
'qx.ui.form.Button' );org.eclipse.swt.ButtonUtil.setLabelMode(
w );w.setIcon( null );w.addEventListener( "execute",
org.eclipse.swt.EventUtil.widgetSelected );w.setSpace( 10, 93, 11,
25 );w.setZIndex( 300 );w.setTabIndex( 5 );wm.setFont( w, [ "Segoe UI",
"Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11,
false, false );w.setLabel( "OK" );var w = wm.findWidgetById(
"w386" );w.setDefaultButton( wm.findWidgetById( "w384" ) );var w =
wm.newWidget( "w385", "w389", true, null,
'qx.ui.form.Button' );org.eclipse.swt.ButtonUtil.setLabelMode(
w );w.setIcon( null );w.addEventListener( "execute",
org.eclipse.swt.EventUtil.widgetSelected );w.setSpace( 109, 93, 11,
25 );w.setZIndex( 299 );w.setTabIndex( 6 );wm.setFont( w, [ "Segoe UI",
"Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11,
false, false );w.setLabel( "Cancel" );var w = wm.findWidgetById(
"w386" );w.setActiveControl( wm.findWidgetById(
"w383" ) );org.eclipse.swt.WidgetManager.getInstance().focus(
"w383" );qx.ui.core.Widget.flushGlobalQueues();org.eclipse.swt.Even tUtil.resumeEventHandling();org.eclipse.swt.FontSizeCalculat ion.measureStrings(
[ [ 9677164, "OK", [ "Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans
Unicode", "sans-serif" ], 11, false, false, -1 ], [ 25261216, "Cancel", [
"Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode",
"sans-serif" ], 11, false, false, -1 ] ] );Thanks for your help!
Re: Upload Widget in a RAP environment without OSGi [message #107371 is a reply to message #107335] Wed, 01 October 2008 06:50 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alois,

strange... it seems as if the Qooxdoo-part of the UploadWidget isn't
registered correctly.

- Can you make sure, that the upload-bundle is in ACTIVE state?
- Is this JBoss-specific or does it ocurr on Tomcat/Jetty as well?
- Does the upload-demo project work in the same environment?
- Do you use the latest version vom CVS-HEAD?

Regards,
Stefan.
Re: Upload Widget in a RAP environment without OSGi [message #107451 is a reply to message #107335] Wed, 01 October 2008 07:07 Go to previous message
Eclipse UserFriend
Originally posted by: rherrmann.innoopract.com

the error occurs because the Javascript files for the upload widget
are missing.

Usually they are registered via the extension point
'org.eclipse.rap.ui.resources'. An IResource implementation must be
given there that describes the resource. RAP puts all Javascript
resources together and delivers them in the index.html to the client.

In your case this information is never evaluated.

But there is more. All what is currently specified in the plugin.xml
of org.eclipse.rwt.widgets.upload needs to be specified otherwise.

Here is what you would need to do when using RWT standalone (without
having actually tried it)
* specify web.xml
<init-param>
<param-name>org.eclipse.rwt.resources</param-name>
<param-value>
[comma-separated list of IResource implementations]
</param-value>
</init-param>
Take the class names from the plugin.xml of
org.eclipse.rwt.widgets.upload
* register the /upload servlet (also see plugin.xml)
* the org.eclipse.rap.ui.themeableWidgets extension needs a
replacement too, but right now, I can't find where to specify
this in the web.xml. With some luck, the upload widget may
work without theming.

HTH
Rüdiger
-----------------------------
Rüdiger Herrmann
Innoopract
http://innoopract.com
delivering eclipse technology

Alois Wurmdobler wrote:
> Hi!
>
> As already mentioned, I've a RAP application running on JBoss without the
> OSGi environment. Everything works fine except for the upload widget. Is
> there anything special I have to do?
> The error I got message is:
> Could not evaluate javascript response:
>
> TypeError: org.eclipse.rwt.widgets.Upload is not a constructor
>
> org.eclipse.swt.EventUtil.suspendEventHandling();var req =
> org.eclipse.swt.Request.getInstance();req.setRequestCounter( "35" );var wm =
> org.eclipse.swt.WidgetManager.getInstance();var w = wm.newWidget( "w390",
> "w12", true, null, 'qx.ui.layout.CanvasLayout' );w.setOverflow(
> "hidden" );w.setHideFocus( true );w.setAppearance(
> "composite" );w.setSpace( 0, 0, 0, 0 );w.setZIndex( 299 );var w =
> wm.newWidget( "w391", "w390", true, null, 'org.eclipse.rwt.widgets.Upload',
> '" https://localhost:8443/enrisma/risk?custom_service_handler=o rg.eclipse.rwt.widgets.upload.servlet.FileUploadServiceHandl er&widgetId=3149782",
> 2' );w.setAppearance( "composite" );w.setOverflow( "hidden" );w.setSpace( 0,
> 0, 0, 0 );w.setZIndex( 300 );w.setLastFileUploaded(
> "" );w.setBrowseButtonText( "Browse" );w.setUploadButtonText( "Upload" );var
> w = wm.newWidget( "w386", "", false, null,
> 'org.eclipse.swt.widgets.Shell' );w.addToDocument();w.addState(
> "rwt_BORDER" );w.addState( "rwt_APPLICATION_MODAL" );w.addState(
> "rwt_TITLE" );w.setShowMinimize( false );w.setAllowMinimize(
> false );w.setShowMaximize( true );w.setAllowMaximize(
> true );w.setShowClose( true );w.setAllowClose( true );w.setResizable( true,
> true, true, true );w.setParentShell( wm.findWidgetById(
> "w12" ) );w.initialize();w.addEventListener( "changeWidth",
> org.eclipse.swt.EventUtil.widgetResized );w.addEventListener(
> "changeHeight",
> org.eclipse.swt.EventUtil.widgetResized );w.addEventListener( "changeLeft",
> org.eclipse.swt.EventUtil.widgetMoved );w.addEventListener( "changeTop",
> org.eclipse.swt.EventUtil.widgetMoved );w.setSpace( 731, 218, 381,
> 93 );w.setVisibility( true );w.open();w.setActive(
> true );w.setHasShellListener( true );var w = wm.newWidget( "w383", "w386",
> true, null, 'qx.ui.layout.CanvasLayout' );w.setOverflow(
> "hidden" );w.setHideFocus( true );w.setAppearance(
> "composite" );w.setSpace( 1, 212, 20, 69 );w.setZIndex( 300 );var w =
> wm.newWidget( "w387", "w383", true, null,
> 'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
> true );w.setAppearance( "composite" );w.setSpace( 0, 212, 0,
> 22 );w.setZIndex( 300 );var w = wm.newWidget( "w388", "w383", true, null,
> 'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
> true );w.setAppearance( "composite" );w.setSpace( 0, 212, 22,
> 47 );w.setZIndex( 299 );wm.setFont( w, [ "Segoe UI", "Corbel", "Calibri",
> "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, false, false );var w =
> wm.newWidget( "w389", "w388", true, null,
> 'qx.ui.layout.CanvasLayout' );w.setOverflow( "hidden" );w.setHideFocus(
> true );w.setAppearance( "composite" );w.setSpace( 0, 212, 0,
> 47 );w.setZIndex( 300 );wm.setFont( w, [ "Segoe UI", "Corbel", "Calibri",
> "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11, false, false );var w =
> wm.newWidget( "w384", "w389", true, null,
> 'qx.ui.form.Button' );org.eclipse.swt.ButtonUtil.setLabelMode(
> w );w.setIcon( null );w.addEventListener( "execute",
> org.eclipse.swt.EventUtil.widgetSelected );w.setSpace( 10, 93, 11,
> 25 );w.setZIndex( 300 );w.setTabIndex( 5 );wm.setFont( w, [ "Segoe UI",
> "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11,
> false, false );w.setLabel( "OK" );var w = wm.findWidgetById(
> "w386" );w.setDefaultButton( wm.findWidgetById( "w384" ) );var w =
> wm.newWidget( "w385", "w389", true, null,
> 'qx.ui.form.Button' );org.eclipse.swt.ButtonUtil.setLabelMode(
> w );w.setIcon( null );w.addEventListener( "execute",
> org.eclipse.swt.EventUtil.widgetSelected );w.setSpace( 109, 93, 11,
> 25 );w.setZIndex( 299 );w.setTabIndex( 6 );wm.setFont( w, [ "Segoe UI",
> "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode", "sans-serif" ], 11,
> false, false );w.setLabel( "Cancel" );var w = wm.findWidgetById(
> "w386" );w.setActiveControl( wm.findWidgetById(
> "w383" ) );org.eclipse.swt.WidgetManager.getInstance().focus(
> "w383" );qx.ui.core.Widget.flushGlobalQueues();org.eclipse.swt.Even tUtil.resumeEventHandling();org.eclipse.swt.FontSizeCalculat ion.measureStrings(
> [ [ 9677164, "OK", [ "Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans
> Unicode", "sans-serif" ], 11, false, false, -1 ], [ 25261216, "Cancel", [
> "Segoe UI", "Corbel", "Calibri", "Tahoma", "Lucida Sans Unicode",
> "sans-serif" ], 11, false, false, -1 ] ] );Thanks for your help!
>
>
Previous Topic:[ANN] Webinar: Single-Sourcing Techniques for RAP and RCP
Next Topic:RAP 1.2
Goto Forum:
  


Current Time: Thu Jul 24 08:04:22 EDT 2025

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

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

Back to the top