-
1. Re: rich:dataTable bug?
sergeysmirnov Aug 17, 2007 8:44 PM (in response to akira_ag)something around, not in the table.
I hope you have value="#{MySessionBean.myCollection}" for the table.
rich:dataTable has no 'rendered' attribute. Does on of the parent in the hierarchy has it?
Are you sure all six phases are passed for the very first request? -
2. Re: rich:dataTable bug?
akira_ag Aug 18, 2007 2:51 AM (in response to akira_ag)I not see anything mistrustful around.
I provide all code of test-case for RF:
file: index.jsp:<?xml version='1.0' encoding='utf-8'?> <jsp:root xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" xmlns:rich="http://richfaces.ajax4jsf.org/rich"> <f:view> <html> <jsp:output doctype-root-element="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/> <jsp:directive.page contentType="text/html;charset=utf-8"/> <head> <title>Bug example / index</title> </head> <body> <h:form> <h:commandLink action="#{ MySessionBean.showDataTable }">Please, show my table</h:commandLink> </h:form> </body> </html> </f:view> </jsp:root>
file: test-bug.jsp:<?xml version='1.0' encoding='utf-8'?> <jsp:root xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" xmlns:rich="http://richfaces.ajax4jsf.org/rich"> <f:view> <html> <jsp:output doctype-root-element="html" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/> <jsp:directive.page contentType="text/html;charset=utf-8"/> <head> <title>Bug example / datatable</title> </head> <body> <h:form> <rich:dataTable id="MyTable" value="#{MySessionBean.myCollection}" var="item"> <rich:column> <h:commandLink action="#{MySessionBean.goToId}"> <f:param name="itemIdParam" value="#{item.id}"/> <h:outputText value="#{item.id}"/> </h:commandLink> </rich:column> </rich:dataTable> </h:form> </body> </html> </f:view> </jsp:root>
file: MySessionBean.java:package test.checkbugs; import java.util.Collection; import java.util.LinkedList; public class MySessionBean { public static class MyItem { private Integer id; public MyItem() {}; public MyItem(Integer val) { this.id = val; }; public void setId(Integer id) { this.id = id; } public Integer getId() { return id; } } private Collection<MyItem> myCollection; public String showDataTable() { setMyCollection(new LinkedList<MyItem> ()); for(int i=0;i<20;i++) myCollection.add(new MyItem(i)); return "success"; } public void setMyCollection(Collection<MyItem> myCollection) { this.myCollection = myCollection; } public Collection<MyItem> getMyCollection() { return myCollection; } public String goToId() { myCollection.clear(); return "success"; } }
I think that it's bug :( -
3. Re: rich:dataTable bug?
ulrichcech Aug 19, 2007 9:17 AM (in response to akira_ag)Hi,
ich ran exactly into the same issue.
I insert a TabPanel, and the changing of the tab (even if switchtype is "client") is enough for the rich:dataTable to work correctly.
Even the datascroller doesn't work (every click is "lost in space") in this situation (first, an extra request/refresh must happen to let the datascroller work).
I changed back to h:dataTable, but I hope this is fixed in an upcoming release. -
4. Re: rich:dataTable bug?
ulrichcech Aug 19, 2007 10:24 AM (in response to akira_ag)I just tested with the 3.1.0 RC2 release, and it seams to work correctly now...
-
5. Re: rich:dataTable bug?
akira_ag Aug 19, 2007 4:44 PM (in response to akira_ag)"UlrichCech" wrote:
I just tested with the 3.1.0 RC2 release, and it seams to work correctly now...
Hi!
I'll try to check this tomorrow.
Thanks!
But I think that will be some other problems with unstable releases. e.g. I did see some problems with suggesionBox with version 3.2.0.