Heyvaert / wiquery

Automatically exported from code.google.com/p/wiquery
0 stars 0 forks source link

Wiquery Causes Other Wicket Wrapped JQuery UI/Plugin Code Not to Work #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create or use another Wicket wrapped JQuery UI component or plugin (in this 
case FlotPanel from Wicket Stuff) on the same page or panel.

What is the expected output? What do you see instead?  Expected output is that 
both will work together, the actual result is that the non-wiquery code gives a 
javascript error.  In the above case the error is: "$.plot is not a function."  
Remove the wiquery component and the flot works fine.  I have seen this same 
problem while trying to use other, similar non wiquery components on the same 
page/panel with wiquery.

What version of the product are you using?  1.5.2, but have also seen it with 
version 1.0.1 On what operating system? Ubuntu Linux 11.04, but have also seen 
it on Windows XP, Windows 7 and Solaris (not sure what version of Solaris).  
Also using Firefox 7.0.1 and Firebug 1.8.4

Providing a good description and a patch or a quickstart [1] will really
help us fixing the problem quickly! Please provide any additional
information below.

[1] Wicket 1.5.2 quickstart with Wiquery 1.5.2, and wicketstuff-flot 1.5.2.  I 
copied the example FlotPanel from the wicketstuff flot-examples and verified it 
to work by itself.  Add in the Dialog from wiquery and the Dialog works, but 
the flot doesn't.  Also in the attachment is a screenshot with the error in 
Firebug and the html source.

Original issue reported on code.google.com by t...@urberg.net on 15 Nov 2011 at 4:25

Attachments:

GoogleCodeExporter commented 9 years ago
Apologies for the late response. 

WiQuery is not build for dealing with all jquery enabled components made by 
others simply because WiQuery adds several resources automatically based on 
your needs. In this example the FlotPanel adds its own resources in a very odd 
tag. WiQuery messes this up because duplicate resources exist.

I have altered the flotpanel by creating a subclass. Please see the newly 
uploaded tarball.

Original comment by hielke.hoeve on 2 Dec 2011 at 4:14

Attachments:

GoogleCodeExporter commented 9 years ago
This tarball shows how resources are added using wicket and prevent duplicate 
resources which mess up everything.

Original comment by hielke.hoeve on 2 Dec 2011 at 4:14