Table sorting problem in Safari
pkx Aug 5, 2010 6:28 AMHello everyone.
Apparently there is a problem when sorting a Richfaces datatable/column in Safari (5 or 4) on Mac with the sortBy attribute. The sorting fails as soon as the table contains a column of rich:calendar and/or rich:comboBox components - maybe other richfaces components are also don't work. After clicking on the sort icon, all table entries disappear. In that case the JavaScript console of Safari displays the following error message:
Is there any solution/workaround to fix this sorting problem? The problem does not occur with Safari 4 on a Windows machine.
Below you can find a simple example, that fails in Safari on Mac.
Best regards
pkx
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<%@ taglib uri="http://chors.de/tld/chors" prefix="chors"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
<title> TestEntity Table</title>
</head>
<body>
<f:view>
<a4j:form id="TestEntityTableForm" >
<rich:dataTable id="TestEntityTable" value="#{testBackingBean.allEntities}"
var="entity" rows="20" width="600px"
sortMode="single" >
<rich:column sortBy="#{entity.stringValue}" >
<f:facet name="header"> <h:outputText value="String" /> </f:facet>
<h:inputText value="#{entity.stringValue}" />
</rich:column>
<rich:column sortBy="#{entity.dateValue}" >
<f:facet name="header"> <h:outputText value="Date" /> </f:facet>
<rich:calendar value="#{entity.dateValue}" />
</rich:column>
</rich:dataTable>
</a4j:form>
</f:view>
</body>
</html>