gwtbootstrap3 / gwtbootstrap3-extras

Extra (third party) wrappers for GwtBootstrap3
Apache License 2.0
43 stars 89 forks source link

unable to use select #223

Closed bbbalabhaskar closed 9 years ago

bbbalabhaskar commented 9 years ago

I am getting following error when i'm using select

Uncaught com.google.gwt.user.client.ui.AttachDetachException: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: (TypeError) : $wnd.jQuery(...).selectpicker is not a function

crevete commented 9 years ago

Can you please provide a sample code?

bbbalabhaskar commented 9 years ago

I have done nothing new I added dependency in my pom, and my gwt.xml file,

but when I add select like below i got that error, can you help me

<select:Select>
  <select:Option text="1"/>
  <select:Option text="2"/>
  <select:Option text="3"/>
</select:Select>

i am using gwt 2.7

crevete commented 9 years ago

maybe jQuery is not loaded ? Or you can check out our demo project. There are some working examples.

bbbalabhaskar commented 9 years ago

I'm very sure that jQuery is injected in in window as i am doing it manually in other place for some native js implementation regarding canvas.

BTW thanks, for responding and all the other features are working without any problem.

sjardine commented 9 years ago

This error looks like jQuery is getting loaded multiple times. Which module are you adding to your gwt.xml?

sjardine commented 9 years ago

Also, its impossible for us to troubleshoot a problem we cannot see. Please fork the gwtbootstrap3-sample project and modify it so it exhibits your problem. Then we can troubleshoot much easier.

bbbalabhaskar commented 9 years ago

Thanks for suggestion i could be able to resolve the problem, and as you said it was due to reason that jQuery is injecting multiple times and i think issue can be closed.

bhagyalakshmisabbella commented 6 years ago

How we can know jQuery is injecting multiple times and if so how can we avoid it.

sjardine commented 6 years ago

I would suggest not using modules that use the script injector. Inherit from the "no resources" or "no theme" modules and then inject the difference scripts you need in your index.html.

This gives you the most control over how and when the scripts are injected.