aspose file tools*
The moose likes JSF and the fly likes JQuery not working in JSF 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JQuery not working in JSF 2.0" Watch "JQuery not working in JSF 2.0" New topic

JQuery not working in JSF 2.0

Rehab Bozic

Joined: Apr 10, 2011
Posts: 4
I am trying to use JQuery full calendar ( ) in my xhtml page that looks like this:


I have defined I am trying to use JQuery full calendar ( ) in my xhtml page that looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns=""

<title>Sign in</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel='stylesheet' type='text/css' href='./fullcalendar/fullcalendar.css' />
<link rel='stylesheet' type='text/css' href='./fullcalendar/fullcalendar.print.css' media='print' />
<script type='text/javascript' src='./jquery/jquery-1.5.2.min.js'></script>
<script type='text/javascript' src='./jquery/jquery-ui-1.8.11.custom.min.js'></script>
<script type='text/javascript' src='./fullcalendar/fullcalendar.min.js'></script>

<script type='text/javascript'>
$j = jQuery.noConflict(); so there is no conflict, I have also tried putting .js files in resource files and loading them with <hutputScript> but no sucess.

I am using rich faces 4.0 and JSF 2.0. I have no exceptions or errors, but the page is just no loading, ie I don't have calendar in appropriate 'calendar' div tag.
Can anyone suggest solution for this problem?
Rehab Bozic

Joined: Apr 10, 2011
Posts: 4
Ok, sorry for that, the actual page looks like this:

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641

RichFaces has a pretty powerful calendar control itself. If you can use it, that should be less trouble.

Otherwise, you might want to look at the RichFaces <a4j:script > element, which is designed to allow references to JavaScript resources in a JSF-friendly way.

RichFaces uses jQuery internally, and it mostly works well with user-supplied jQuery code as well, but there are cases (and versions) where problems have come up. so it's worth doing a web search.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: JQuery not working in JSF 2.0
Similar Threads
rich:hotKey worked when using jQuery?
Embedding Flex component in JSF 2.0
json object send to JSF backing bean to xhtml page
change event is firing twice
Drop Down Menu Problem