[ http://issues.apache.org/jira/browse/MYFACES-743?page=comments#action_12358862 ]
Shane Bryzak commented on MYFACES-743: -------------------------------------- I found a bug in the CookieLib_setCookie method in cookielib.js - the following test: if (value != undefined && value != null && value != "") does not take into account that the Array prototype may contain additional functions. For example, if I have some javascript as follows which adds a "contains" method to Array: Array.prototype.contains = function (element) { for (var i = 0; i < this.length; i++) { if (this[i] == element) return true; } return false; }; the "for" loop in CookieLib_setCookie will include "contains" (the name of my additional method) and the value returned from the array will be a function pointer, not a string. The solution for this is to test the type of the value returned from the array: if (value != undefined && value != null && value != "" && typeof(value) != "function") I'll attach a diff to correct this. > Javascript conflict between x:tree2 and x:inputCalendar > ------------------------------------------------------- > > Key: MYFACES-743 > URL: http://issues.apache.org/jira/browse/MYFACES-743 > Project: MyFaces > Type: Bug > Components: Tomahawk > Versions: 1.1.1 > Reporter: Luciano Medina > > I have a x:tree2 component with client-side toggling. When I add a > x:inputCalendar with the attribute renderAsPopup="true", the node toggling > links of the tree stop working and I get the following Javascript error: > Error: value.indexOf is not a function > Source file: > [...]/org.apache.myfaces.custom.tree2.HtmlTreeRenderer/11297774/javascript/cookielib.js > Line: 108 > This bug was not present on version 1.0.9m9 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira