myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave E Martin (JIRA)" <>
Subject [jira] Created: (MYFACES-127) dataTable (or h:column rendered=) confuses its var with previous instances of dataTable
Date Fri, 11 Mar 2005 01:05:56 GMT
dataTable (or h:column rendered=) confuses its var with previous instances of dataTable

         Key: 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"/>
                <h:dataTable var="item" value="#{ctrl.entitySc.addresses.currentList}">
                        <jsp:directive.include file="/jspf/Entity2Address/addressesOnly.jspf"/>

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:, property:

Entity2Address is the class type of the FIRST datatable "item"
The second datatable "item" is a different class type which does have an "externalVisible"

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:
If you want more information on JIRA, or have a bug to report see:

View raw message