John Smith created TOMAHAWK-1661: ------------------------------------ Summary: dataTable value evaluated if parent component not rendered if preserveDataModel is true Key: TOMAHAWK-1661 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1661 Project: MyFaces Tomahawk Issue Type: Bug Affects Versions: 1.1.14 Reporter: John Smith
If a t:dataTable's parent component's rendered attribute evaluates to false, the dataTable's value attribute is still evaluated if the dataTable has the preserveDataModel attribute set to true. While I don't think this strictly violates the spec (it says under 2.2.6: 'If the isRendered() method of a component returns false, the renderer for that component must not generate any markup, and none of its facets or children (if any) should be rendered.'), it is at the very least inconsistent with other JSF components, which do not evaluate the value if not rendered Example: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:t="http://myfaces.apache.org/tomahawk" > <h:head /> <h:body> <h:form> <h:panelGroup rendered="false"> <t:dataTable value="#{bean.list}" var="list" preserveDataModel="true" > <h:column>#{list}</h:column> </t:dataTable> </h:panelGroup> </h:form> </h:body> </html> ------------------------------------------------- @RequestScoped @ManagedBean public class Bean { public List<String> getList(){ throw new RuntimeException("this should not be called"); } } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira