Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Javascript Error when changing view using ViewStack(I have 2 views, I switch to second view, open a modal dialog in that view, and cancel out, then switch back to first view, and get a javascript error.)
Javascript Error when changing view using ViewStack [message #836665] Wed, 04 April 2012 15:17 Go to next message
George R Malary is currently offline George R Malary
Messages: 36
Registered: March 2012
Location: New Jersey
Member
I have 2 views stacked. Initial view creates NodeOverviewComposite that is just a tableviewer and loads contents for nodes. Then I switch to second view. I open a modal dialog on second view (it creates its own version of the NodeOverviewComposite to show the same table and nodes as the first view), then I close that dialog. I try to switch back to the first view, and get the javascript errors shown in the attached screenshots. I get different messages when using the M3 release, and the M6 release, but I assume its the same issue.

Can the problem be I am creating 2 instances of the same composite on different views? Can I share the composite and table between views, and a refresh on one view would update both tables?

I read from the following bug that javascript errors where RAP bugs, so maybe that is the case. (Sorry, I'm told I cannot post links until I have more than 25 messages Sad)

Post: 757904


Regards.

George
Re: Javascript Error when changing view using ViewStack [message #836690 is a reply to message #836665] Wed, 04 April 2012 15:52 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1691
Registered: July 2009
Senior Member
Hi George,
I think that the error in 1.5M6 is related to this bug:
375246: Can't set custom widget id's
https://bugs.eclipse.org/bugs/show_bug.cgi?id=375246
It is fixed in CVS HEAD. As a temporary workaround, disable custom
widget ids by setting the org.eclipse.rwt.enableUITests system property
to false. If this does not help, please file a bugzilla and attach a
self-running snippet to reproduce it.
Best,
Ivan

On 4/4/2012 10:17 PM, George R Malary wrote:
> I have 2 views stacked. Initial view creates NodeOverviewComposite that is just a tableviewer and loads contents for nodes. Then I switch to second view. I open a modal dialog on second view (it creates its own version of the NodeOverviewComposite to show the same table and nodes as the first view), then I close that dialog. I try to switch back to the first view, and get the javascript errors shown in the attached screenshots. I get different messages when using the M3 release, and the M6 release, but I assume its the same issue.
>
> Can the problem be I am creating 2 instances of the same composite on different views? Can I share the composite and table between views, and a refresh on one view would update both tables?
>
> I read from the following bug that javascript errors where RAP bugs, so maybe that is the case. (Sorry, I'm told I cannot post links until I have more than 25 messages :()
>
> Post: 757904
>
>
> Regards.
>
> George

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Javascript Error when changing view using ViewStack [message #836802 is a reply to message #836690] Wed, 04 April 2012 19:43 Go to previous messageGo to next message
George R Malary is currently offline George R Malary
Messages: 36
Registered: March 2012
Location: New Jersey
Member
Hi Ivan,

Thanks for the reply. It seems that maybe that is the same problem. I don't have any problem when I disable the custom widget ids.

Unfortunately, we use selenium for automation, and need the custom widget ids. Is there another workaround that is possible? And when is the fix for the mentioned bug going to be released?

When I get the error page, if I refresh the browser, the application is working properly again. I guess we can maybe use that as an ugly workaround until the fix is applied. I just hope that this issue is resolved by that fix, because there seem to be differences. It seems that in that bug, widget ids could not be set at all. In my case, widget id's are set and work fine with M6. The problem only occurs when switching views and reusing the NodeOverviewComposite. Maybe problem has to do with recreating a widget with the same id as an already existing widget, albeit in another view, maybe??
Re: Javascript Error when changing view using ViewStack [message #836967 is a reply to message #836802] Thu, 05 April 2012 01:15 Go to previous message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1691
Registered: July 2009
Senior Member
Hi George,
the fix will be part of 1.5M7 (May 11). If usage of custom ids is
important for you, you could use the nightly runtime build where the
problem is fixed [1]
[1] http://www.eclipse.org/rap/downloads/

> Maybe problem has to do with recreating a widget with the same id as
> an already existing widget, albeit in another view, maybe??
Probably. Using the same id on two "active" widgets is not a good idea.
Best,
Ivan

--
Ivan Furnadjiev

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

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:[Solved] Problem Integrating RAP/Spring DM
Next Topic:How to disable the selected perspective right-click menu?
Goto Forum:
  


Current Time: Thu Apr 17 17:28:16 EDT 2014

Powered by FUDForum. Page generated in 0.04205 seconds