[
http://jira.jboss.com/jira/browse/RF-3612?page=comments#action_12415501 ]
Kiran Patel commented on RF-3612:
---------------------------------
I managed to get it working by replacing the implementation of getElementsByClassName in
the prototype.js by the one in the richfaces 3.1.2.
if (Prototype.BrowserFeatures.XPath) {
document._getElementsByXPath = function(expression, parentElement) {
var results = [];
var query = document.evaluate(expression, $(parentElement) || document,
null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0, length = query.snapshotLength; i < length; i++)
results.push(query.snapshotItem(i));
return results;
};
document.getElementsByClassName = function(className, parentElement) {
var q = ".//*[contains(concat(' ', @class, ' '), ' " +
className + " ')]";
return document._getElementsByXPath(q, parentElement);
}
} else document.getElementsByClassName = function(className, parentElement) {
var children = ($(parentElement) || document.body).getElementsByTagName('*');
var elements = [], child, pattern = new RegExp("(^|\\s)" + className +
"(\\s|$)");
for (var i = 0, length = children.length; i < length; i++) {
child = children[i];
var elementClassName = child.className;
if (elementClassName.length == 0) continue;
if (elementClassName == className || elementClassName.match(pattern))
elements.push(Element.extend(child));
}
return elements;
};
Richfaces 3.1.4.GA uses prototype.js version 1.6, which is a latest version. In fact, the
getElementsByClassName() has been deprecated in 1.6 version, though I think it should work
on IE6—it is deprecated to support html 5.0.
Could you please point out any impact of this change. I think there should not be any
functional impact but may be performance!!! dont know really...
I am still not able to understand that why it is causing problem for https and not for
http urls!!!!
Problem using suggestion box over https
---------------------------------------
Key: RF-3612
URL:
http://jira.jboss.com/jira/browse/RF-3612
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.4
Reporter: Kiran Patel
Priority: Critical
Attachments: httpjira.jboss.comjirabrowseRF-3612.msg
I am using richfaces 3.1.4 GA on JSF 1.1, Weblogic 8.1, JDK 1.4.2_x.
I am using richfaces suggestion box for autocompletion of some value and its working fine
for me as long as I used it over the http.
But if I try to use it over the https , it gives me below js error.
Line 4154, char 5, Object doesn't support this property or method...
It is actually coming on the on prototype.js for the lines
4152: return function(className, parentElement) {
4153: return $(parentElement ||
document.body).getElementsByClassName(className);
4154: };
This errors come at the time of rendering the suggestionbox after filling some characters
in the textbox.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira