File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes RE: Using jQuery with JSF 2.0's resource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "RE: Using jQuery with JSF 2.0 Watch "RE: Using jQuery with JSF 2.0 New topic
Author

RE: Using jQuery with JSF 2.0's resource

H G Brown
Greenhorn

Joined: Nov 15, 2010
Posts: 2
Hi all,

I am struggling to get jQuery UI (1.8.6) library integrated with JSF 2.0 (Facelets) using the resources functionality. I have re-factored the index.html from the standard jQuery UI library to use JSF tags in the head of my page as follows:



I then include the details of the index.html which comes with the jQuery UI download (showcasing the different components) in the body of my page. All the elements are displayed and function correctly (Accordian, Autocomplete etc) except that none of the images are displayed (e.g. the Framework Icons are all just empty gray boxes, there is no prev/next images on the datepicker etc).

If I forgo the JSF tags above and include the css and scripts using standard html tags, i.e.


Then everything works and the images are displayed as expected.

Has anybody managed to get this working? Any help or pointers in the right direction would certainly be appreciated.
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218

Try omitting the library="..." and add the prefix to the name= attribute. There have been some
issues raised in the primefaces forum on this, and this will help (I hope), although I cannot say
why.

Regards,
Brendan.
H G Brown
Greenhorn

Joined: Nov 15, 2010
Posts: 2
Hi Brendan

Thanks very much for your help and time. I can confirm that your solution works 100% though I can't really explain why either.

Best Regards,
Henry
Brendan Healey
Ranch Hand

Joined: May 12, 2009
Posts: 218
I'm glad it worked, I suppose it's pretty obvious really, library= simply doesn't work with
hutputScript with Mojarra 2.0.3. Or maybe it's less simple than that! Nothing would
surprise me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: RE: Using jQuery with JSF 2.0's resource
 
Similar Threads
jQuery auto complete with jsf
Expression Language inside javascript file
jquery accordion and tabs on the same page
JSON JQuery Grid Not getting value in JSP
jQuery UI tabs not loading in the same tab