This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF <t:inputCalendar> tag incompatible with Jquery!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF <t:inputCalendar> tag incompatible with Jquery!!!!" Watch "JSF <t:inputCalendar> tag incompatible with Jquery!!!!" New topic
Author

JSF <t:inputCalendar> tag incompatible with Jquery!!!!

Asish Chakraborty
Greenhorn

Joined: Jul 05, 2011
Posts: 1
In a project using JSF, I am importing the Jquery library(jquery.min.js) to do some ajax call. In the same page I have a <t:inputCalendar> tag as follows.

<t:inputCalendar id="neweffectivePerioddateFrom" forceIdIndex="false" value="#{a.fromDate}"
styleClass="TextBoxStyle" align="right" popupDateFormat="MMM-dd-yyyy" renderAsPopup="true"
renderPopupButtonAsImage="true" style="width:150" maxlength="11" popupButtonImageUrl="/images/Icon_calendar.gif"
onmousedown="return clickIcon(this)" onkeydown="return clickIcon(this)" title="Enter the start date" popupLeft="true" >
<f:convertDateTime pattern="MMM-dd-yyyy" timeZone="IST" />
</t:inputCalendar>


The problem is that when the calendar comes as a pop-up and I try to select a date, nothing happens. I am not even able to close the calendar pop-up. But when I remove the Jquery part along with the import part of the Jquery library, the calendar works!!!

Not having any idea about it. Please help.
Inna Za
Greenhorn

Joined: Sep 20, 2012
Posts: 2

This is a conflict of jquery.js and prototype.js. This inputCalendar uses Prototype is a JavaScript Framework. Conflict is near the usage of $ symbol.
To fix this problem you can use this code, that you put after your java scripts includes:


you will declare another symbol for jquery and then you can use calls of jquery methods like this
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14571
    
    7

That was over a year ago. Probably didn't help him.

Oh well...


Customer surveys are for companies who didn't pay proper attention to begin with.
Inna Za
Greenhorn

Joined: Sep 20, 2012
Posts: 2

Tim Holloway wrote:That was over a year ago. Probably didn't help him.

Oh well...

I've decided to answer because I had the same trouble. It may help someone else next year :-)
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JSF <t:inputCalendar> tag incompatible with Jquery!!!!
 
Similar Threads
Problems with rich:calendar
pls help in t:calander i need it badly pls help
validation of two calendars
t:div, s;fieldset and t::inputCalendar confilict
JSF- tomahawk calander problem