Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.1.0.BETA1
-
Fix Version/s: 3.1
-
Component/s: QA, Sample Apps
-
Labels:None
-
Environment:ICEfaces3/trunk rev. 29153
Browsers: IE7, Firefox3.6/12, Chrome19
Server: Tomcat6
-
Assignee Priority:P1
Description
Firefox/Chrome:
Internet Explorer:
Sample Applications:
1) elementUpdate:
Firefox and Chrome: InputElementsCommon - times out waiting for Attribute after clicking on 'Class Name' button. Fails manually when testing common "className" attribute.
2) auctionMonitor:
Chrome:
Rendering issue, when clicking to bid on an item a yellow rectangle renders, highlighting the first row in the table. This cannot be removed until clicking outside the bid table, as example to sort items by bids. Screenshot attached, auctionMonitor-render.png.
Firefox:
chat fails; first user that joins chat cannot send a message.
Internet Explorer:
chat fails, a JS error happens when user1 clicks to join chat. (attachment chat-IE.png)
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
So looks like at least some of the issues are our own fault. Changes were made to jsf.js as per:
http://java.net/jira/browse/JAVASERVERFACES-2381
We submitted this as part of suggested fix to help with our own DOM diff work but I can't find the specific case. Perhaps this one:
http://jira.icesoft.org/browse/ICE-7803
In any event, the change was to how the attributes of a DOM node where retrieved and compared. Here's the relevant diff:
[deryk] resources > svn diff -r9903:9904 jsf.js
Index: jsf.js
===================================================================
— jsf.js (revision 9903)
+++ jsf.js (revision 9904)
@@ -691,8 +691,8 @@
// First, copy over core attributes
for (iIndex = 0,iLength = coreElementAttributes.length; iIndex < iLength; iIndex++) {
attributeName = coreElementAttributes[iIndex];
- newValue = source[attributeName];
- oldValue = target[attributeName];
+ newValue = source.getAttribute(attributeName);
+ oldValue = target.getAttribute(attributeName);
if (oldValue != newValue) { target[attributeName] = newValue; }@@ -702,8 +702,8 @@
if (target.nodeName.toLowerCase() === 'input') {
for (iIndex = 0,iLength = inputElementAttributes.length; iIndex < iLength; iIndex++) {
attributeName = inputElementAttributes[iIndex]; - newValue = source[attributeName];
- oldValue = target[attributeName];
+ newValue = source.getAttribute(attributeName);
+ oldValue = target.getAttribute(attributeName);
if (oldValue != newValue) { target[attributeName] = newValue; }
The problem is that some attributes exist that can only be retrieved the "old" way. For example, if I try to get "className":
var theInputText = document.getElementById('j_idt22:in');
<input class="A" id="j_idt22:in" lang="en" name="j_idt22:in" size="15" style title="A" type="text" value="A">
theInputText['className'];
"A"
theInputText.getAttribute('className');
null
This is because "className" is a hard attribute of the node in the DOM, but "className" is not in the collection of attributes. In that collection, it's called "class".
Patch from ICE-8156 resolves the last of these issues.