[
https://issues.jboss.org/browse/RF-12026?page=com.atlassian.jira.plugin.s...
]
Brian Leathem edited comment on RF-12026 at 3/23/12 11:54 AM:
--------------------------------------------------------------
Brian:
Yes, here is a small sample that will reproduce the error: It displays an
ExtendedDataTable with the clientRows property set. If you drag the vertical scroller to
the bottom, the table wount render anything due to the js-error.
Browser: FireFox 3.6.28
A fix would be to replace the guard "if (event) {" with "if (event
&& event instanceof Object) {" (line 129 in richfaces-queue.js).
{code:title=edt.xhtml}
<?xml version="1.0" encoding="UTF-8"?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd"
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
<h:head
<title>JSF Demo</title
</h:head
<h:body
<h:form id="hwForm"
<rich:extendedDataTable value="#{edtBean.edtData}"
var="rowdata" id="table" clientRows="20"
style="height:300px; width:500px;" selectionMode="multiple"
<rich:column
<f:facet name="header"
<h:outputText value="col 1" /
</f:facet
<h:outputText
value="#{rowdata[0]}" /
</rich:column
<rich:column
<f:facet name="header"
<h:outputText value="col 2" /
</f:facet
<h:outputText
value="#{rowdata[1]}" /
</rich:column
<rich:column
<f:facet name="header"
<h:outputText value="col 3" /
</f:facet
<h:outputText
value="#{rowdata[2]}" /
</rich:column
</rich:extendedDataTable
</h:form>
</h:body
</html
{code}
{code:title=EdtBean.java}
package org.bogus;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
//@RequestScoped
@SessionScoped
@Named
public class EdtBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<String[]> mEdtData = new ArrayList<String[]>();
public EdtBean() {
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
}
public void setEdtData(List<String[]> mEdtData) {
this.mEdtData = mEdtData;
}
public List<String[]> getEdtData() {
return mEdtData;
}
}
{code}
was (Author: uad):
Brian:
Yes, here is a small sample that will reproduce the error: It displays an
ExtendedDataTable with the clientRows property set. If you drag the vertical scroller to
the bottom, the table wount render anything due to the js-error.
Browser: FireFox 3.6.28
A fix would be to replace the guard "if (event) {" with "if (event
&& event instanceof Object) {" (line 129 in richfaces-queue.js).
edt.xhtml:
<?xml version="1.0" encoding="UTF-8"?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd"
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j"
<h:head
<title>JSF Demo</title
</h:head
<h:body
<h:form id="hwForm"
<rich:extendedDataTable value="#{edtBean.edtData}"
var="rowdata" id="table" clientRows="20"
style="height:300px; width:500px;" selectionMode="multiple"
<rich:column
<f:facet name="header"
<h:outputText value="col 1" /
</f:facet
<h:outputText
value="#{rowdata[0]}" /
</rich:column
<rich:column
<f:facet name="header"
<h:outputText value="col 2" /
</f:facet
<h:outputText
value="#{rowdata[1]}" /
</rich:column
<rich:column
<f:facet name="header"
<h:outputText value="col 3" /
</f:facet
<h:outputText
value="#{rowdata[2]}" /
</rich:column
</rich:extendedDataTable
</h:form>
</h:body
</html
EdtBean.java:
package org.bogus;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
//@RequestScoped
@SessionScoped
@Named
public class EdtBean implements Serializable {
private static final long serialVersionUID = 1L;
private List<String[]> mEdtData = new ArrayList<String[]>();
public EdtBean() {
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
mEdtData.add(new String[]{"Apa", "Boa", "Cikada"});
mEdtData.add(new String[]{"Doris", "Emma", "Frida"});
mEdtData.add(new String[]{"Glosa", "Hemkunskap", "IG"});
mEdtData.add(new String[]{"Jul", "Kristihimmelfärdsdag",
"Långfredag"});
mEdtData.add(new String[]{"Mousaka", "Nudlar",
"Omelett"});
mEdtData.add(new String[]{"Paris", "Quibet", "Rotebro"});
mEdtData.add(new String[]{"Skotland", "Tanzania",
"Uruguay"});
mEdtData.add(new String[]{"Vask", "Whiteboard",
"X-krok"});
mEdtData.add(new String[]{"Youngblood", "ZZ-Top",
"Ådalen31"});
}
public void setEdtData(List<String[]> mEdtData) {
this.mEdtData = mEdtData;
}
public List<String[]> getEdtData() {
return mEdtData;
}
}
> Javascript error in AjaxRequests on FireFox "invalid 'in' operand
event"
> ------------------------------------------------------------------------
> Key: RF-12026
> URL:
https://issues.jboss.org/browse/RF-12026
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.0.Final
> Environment: Firefox 3.6.27, 11.0
> Reporter: Ulf Almehed
> Assignee: Brian Leathem
> Priority: Minor
> Labels: regression
> Fix For: 4.2.1.CR1
> Ajax request fails with
javascript error "invalid 'in' operand event", richfaces-queue.js line
130.
> This was introduced by the fix in RF-11943. Checking for existence of layerX fails if
event isn't an Object (but a simple type).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira