Multiple regressions in extendeddatatable with dynamic colum
nfeybesse Jan 14, 2009 3:06 PMHi,
I have problems with
rich:columns and rich:extendeddatatable
1) filterby doesnt''work anymore
2) sortby doesn't work anymore
3) Switch columns doesn't work and never stops if columns Id is defined
1) & 2) are regressions
You can see these problems in a little demo here :
http://www.genericsystem.com/test/test9.gs
Here is the code :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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:a="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jstl/core" xmlns:rich="http://richfaces.org/rich"> <body> <f:view> <h:form id="form"> <rich:extendedDataTable value="#{test3.rows}" var="row" tableState="#{test3.tableState}"> <rich:columns sortBy="#{row[ind]}" filterBy="#{row[ind]}" id="column-#{column.name}" value="#{test.columns}" var="column" index="ind"> <f:facet name="header"> <h:outputText value="#{column.name}" /> </f:facet> <h:outputText value="#{row[ind]}" /> </rich:columns> </rich:extendedDataTable> </h:form> </f:view> </body> </html>
and backbean :
package com.genericsystem.utils; import java.util.Arrays; import java.util.List; import org.jboss.seam.ScopeType; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.jboss.seam.log.Log; import org.jboss.seam.log.Logging; @Name("test3") @Scope(ScopeType.SESSION) public class Test3 { private static final Log log=Logging.getLog(Test.class); private String tableState; private List<Column> columns=Arrays.asList(new Column[]{new Column("Col1"),new Column("Col2"),new Column("Col3")}); private List<List<String>> rows=Arrays.asList( Arrays.asList( new String[]{"a","b","c"}), Arrays.asList( new String[]{"a","b","c"}), Arrays.asList( new String[]{"a","b","c"}), Arrays.asList(new String[]{"d","e","f"})); public List<Column> getColumns(){ return columns; } public List<List<String>> getRows(){ log.info("Call getRows !!!"); return rows; } public String getTableState() { log.info("Get table state : "+tableState); return tableState; } public void setTableState(String tableState) { log.info("Set table state : "+tableState); this.tableState = tableState; } public class Column { private String name; public Column(String name){ this.name=name; } public String getName(){ return name; } } }
NF