Project

General

Profile

Defect #329

Error loading jQuery on initial formInDialog

Added by Wouter Moerdijk almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Start date:
06/14/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

We are trying to use jQuery on various elements in our solution. We are running into a problem when trying to apply jQuery inside a formInDialog. The first time a dialog is shown there is an error thrown. Only after the second attempt (close dialog and try again), the jQuery is applied.

I have prepared a sample solution to show what it going wrong. This is that it is suppost to do:

  1. open main form. in the onShow jQuery is loaded.
  2. change the background-color of the main form to "red" to show jQuery is active
  3. click on the button to open the "dialog" form in a dialog.
  4. change the background-color of this form to "green" to show we can apply jQuery to elements in the dialog

The last step is not performed the first time. What happens is Servoy throws an error saying:

this kind of handler cannot be attached to multiple components; it is already attached to component [MarkupContainer [Component id = contribution]], but component [MarkupContainer [Component id = contribution]] wants to be attached too
Wrapped java.lang.IllegalStateException: this kind of handler cannot be attached to multiple components; it is already attached to component [MarkupContainer [Component id = contribution]], but component [MarkupContainer [Component id = contribution]] wants to be attached too (C:\STB\Care\care_workspace\TestWebUtils\forms\dialog.js#10)
at C:\STB\Care\care_workspace\TestWebUtils\forms\dialog.js:10 (onShow)
at C:\STB\Care\care_workspace\TestWebUtils\forms\main.js:9 (onAction)

When you close the dialog and try again, the code is fired.

Any help would be greatly appreciated.


Files

TestWebUtils.servoy (4.06 KB) TestWebUtils.servoy Wouter Moerdijk, 06/14/2011 05:31 PM

History

#1

Updated by Wouter Moerdijk almost 13 years ago

Is anybody picking this up? I need to be able to use JQuery in a reliable way in all parts of the solution.

#2

Updated by Patrick Talbot over 12 years ago

  • Status changed from New to Closed

Fixed with v1.2

Also available in: Atom PDF