This content has been marked as final.
Show 3 replies
-
1. Re: CRITICAL BUG IN <rich:column>
nbelaevski Feb 12, 2009 6:53 PM (in response to alexeev.net)Hi,
There is an error in your code. rich:column should not be put inside "header" facet. After this change it works for me without problems. BTW, there's one more problem in the code: you should change how column is rendered by action, because in your case value of checkbox affects whether value of menu will be set to model and that doesn't seem a right behavior. -
2. Re: CRITICAL BUG IN <rich:column>
alexeev.net Feb 13, 2009 8:20 AM (in response to alexeev.net)Hi,
"nbelaevski" wrote:
Hi, There is an error in your code. rich:column should not be put inside "header" facet. After this change it works for me without problems.
take a look at this code taken from
http://livedemo.exadel.com/richfaces-demo-3.3.0.GA/richfaces/dataTable.jsf<f:facet name="header"> <rich:columnGroup> <rich:column rowspan="2">
In my example I removed columnGroup tag just to simplify the code. But the wrong behavior is still there - with or without < columnGroup >.BTW, there's one more problem in the code: you should change how column is rendered by action, because in your case value of checkbox affects whether value of menu will be set to model and that doesn't seem a right behavior.
Again, I just tried to simplify the code. The problem is, the setter of property bla is called even if < select > control is not rendered. Take a look at this improved code:public class SessionBean { String bla="initial value"; public void setBla(String v) { throw new UnsupportedOperationException("not-rendered component tries to call this setter! v=" + v); } public String getBla() { return bla; } } <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"> <body><h:form> <h:commandButton value="submit" /> <rich:dataTable> <f:facet name="header"> <rich:column rendered="false"> <h:selectOneMenu value="#{sessionBean.bla}"/> </rich:column> </f:facet> </rich:dataTable> </h:form></body> </html>
click submit and check the stacktrace of the UnsupportedOperationException.
There you can find the org.richfaces.component.UIColumn.processUpdates()
which calls the method javax.faces.component.UIInput.processUpdates()
but there are no rendered UIInput's on the page! -
3. Re: CRITICAL BUG IN <rich:column>
nbelaevski Feb 13, 2009 10:37 AM (in response to alexeev.net)Hello,
Now I see what's wrong. Added a bug: https://jira.jboss.org/jira/browse/RF-6155. Thank you for posting!