[ http://issues.apache.org/jira/browse/MYFACES-127?page=comments#action_61265 ] Dave E Martin commented on MYFACES-127: ---------------------------------------
Just a note to observe that what I was trying to do worked fine in the Sun implementation (I discovered this problem when I switched from jsf to myfaces). > dataTable (or h:column rendered=) confuses its var with previous instances of > dataTable > --------------------------------------------------------------------------------------- > > Key: MYFACES-127 > URL: http://issues.apache.org/jira/browse/MYFACES-127 > Project: MyFaces > Type: Bug > Versions: 1.0.8 beta > Environment: Windows XP SP2 JDK1.5.0_01 Tomcat 5.0.28 > Reporter: Dave E Martin > > I suspect this is probably the same underlying cause as some of the other > issues reported against datatable: > I have: > <%-- address(es) --%> > <f:subview id="addresses" rendered="#{! empty > ctrl.entitySc.addresses.currentList}"> > <h:outputText value="Addresses"/> > <f:verbatim><br></f:verbatim> > <h:dataTable var="item" > value="#{ctrl.entitySc.addresses.currentList}"> > <h:column> > <jsp:directive.include > file="/jspf/Entity2Address/addressesOnly.jspf"/> > </h:column> > </h:dataTable> > </f:subview> > Then later (via a jsp.include directive) I have: > <f:subview id="statusLogs" rendered="#{! empty ctrl.ticketSc.statusLogList}"> > <h:dataTable var="item" value="#{ctrl.ticketSc.statusLogList}" > > > <h:column rendered="#{item.externalVisible}"> > ... > And the following error occurs: > javax.faces.el.PropertyNotFoundException: Bean: > package.path.here.Entity2Address, property: externalVisible > Entity2Address is the class type of the FIRST datatable "item" > The second datatable "item" is a different class type which does have an > "externalVisible" property. > If I change all "item" to "item2" in the second datatable, all is well. > Also, specifically its on the rendered= attribute of the column tag where the > problem is occurring. I have other instances of repeated datatables that seem > to work fine, and the only difference seems to be that those other instances > aren't doing conditional rendering. > The workaround is to use unique var names in each datatable, but this is > inconvenient when trying to reuse (especially via jsp:include) jsp code. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira
