Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Migrating from 2.0->3.0: JS Error ...getInputElement is not a function(We are evaluating a migration from RAP 2.0 to 3.0. In the new version a custom widget is not working, and we get the error message "Error in scripting event type ...: event.widget.getInputElement)
Migrating from 2.0->3.0: JS Error ...getInputElement is not a function [message #1698859] Thu, 18 June 2015 12:39 Go to next message
Nicolai Czempin is currently offline Nicolai CzempinFriend
Messages: 13
Registered: June 2015
Junior Member
I have been asked to evaluate/try out migrating our application from RAP 2.0 to 3.0.

I naively changed the target platform to use RAP 3.0, removed the ClientScripting target platform and made a few changes to get things to compile (mostly those recommended by the migration guide(s)).

The first custom widget that comes up in the test is a date field, and in the new version it does not appear to run anything on the JS side.
The JS console on Chrome gives me this sort of message for various events:
Error stack:
Error: Error in scripting event type KeyDown: event.widget.getInputElement is not a function
    at rwt.scripting.EventBinding._wrapListener (rap-client.js:250)
    at rwt.qx.Class.define.members._dispatchEvent (rap-client.js:17)
    at rwt.qx.Class.define.members.dispatchEvent (rap-client.js:17)
    at Object.rwt.event.EventHandler._processKeyEvent (rap-client.js:47)
    at Object.rwt.event.EventHandler._onkeyevent_post (rap-client.js:47)
    at Object.rwt.event.EventHandler._onKeyEvent (rap-client.js:47)
    at HTMLBodyElement.rwt.define.bind (rap-client.js:7)


I tried to analyse the JS source code from the RAP repository, but didn't get very far with my limited JS and RAP knowledge. I looked for anything with widget.getInputElement, and also googled getInputElement, but none of what I found clarified the issue for me.

1. Do you have any pointers as to whether I need to make any changes to our widgets, or what else I can do?
2. Is it a better idea to migrate from 2.0 to 2.2 first and then to 3.0?

Please note that I wasn't sure exactly what to do with what has changed for the custom IDs (that we use for QF tests, fixing which is secondary to getting the basic application working again), nor am I sure whether it could influence the above behaviour.

Re: Migrating from 2.0->3.0: JS Error ...getInputElement is not a function [message #1698952 is a reply to message #1698859] Fri, 19 June 2015 07:21 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,
without looking into the source of your custom widget I can't help you
much. Your custom widget needs a rework in order to use the new remote API.
HTH,
Ivan

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Migrating from 2.0->3.0: JS Error ...getInputElement is not a function [message #1698966 is a reply to message #1698952] Fri, 19 June 2015 08:23 Go to previous messageGo to next message
Nicolai Czempin is currently offline Nicolai CzempinFriend
Messages: 13
Registered: June 2015
Junior Member
Hmm, interesting. In getting prepared to send you some code I actually noticed something that had previously escaped me. I will investigate further for now; thanks.
Re: Migrating from 2.0->3.0: JS Error ...getInputElement is not a function [message #1698988 is a reply to message #1698966] Fri, 19 June 2015 10:33 Go to previous messageGo to next message
Nicolai Czempin is currently offline Nicolai CzempinFriend
Messages: 13
Registered: June 2015
Junior Member
Okay, so the getInputElement is used to check for a readOnly property, and I guess that has been moved elsewhere. I will go look for it myself, but if you are quicker, do go ahead and point me to the right place.
Re: Migrating from 2.0->3.0: JS Error ...getInputElement is not a function [message #1698992 is a reply to message #1698988] Fri, 19 June 2015 11:14 Go to previous message
Nicolai Czempin is currently offline Nicolai CzempinFriend
Messages: 13
Registered: June 2015
Junior Member
used readOnly from the widget and things work now.

Thanks.
Previous Topic:Tooltips on the FileUpload button
Next Topic:Image scaling with max-height and max-width CSS properties on the client side
Goto Forum:
  


Current Time: Fri Apr 26 09:03:46 GMT 2024

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

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

Back to the top