[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234297#comment-13234297
 ] 

Achim Hensel commented on TOMAHAWK-1615:
----------------------------------------

Demonstration code:

<t:dataTable 
        id="demoTable" 
        value="#{bean.twoEntryList}" 
        var="valueHolder"
        rowIndexVar="riv"
        detailStampExpandedDefault="true"
        varDetailToggler="detailToggler">
        <t:column>
                <f:facet name="header">Header</f:facet>
                <h:commandLink action="#{detailToggler.toggleDetail}">Toggle 
#{riv}</h:commandLink>
        </t:column>
        <f:facet name="detailStamp">
                <t:outputText id="otid_#{riv}" title="T_#{riv}" 
value="V_#{riv}"></t:outputText>
        </f:facet>
</t:dataTable>

Actual output (new formatted):

<table id="reportList:demoTable">
<thead><tr><th>Header</th></tr></thead>
<tbody id="reportList:demoTable:tbody_element">
        <tr><td><a href="#" onclick="return 
oamSubmitForm('reportList','reportList:demoTable:0:_id60');" 
id="reportList:demoTable:0:_id60">Toggle 0</a></td></tr>
                <tr><td colspan="1"><span id="reportList:demoTable:0:otid_" 
title="T_0">V_0</span></td></tr>
        <tr><td><a href="#" onclick="return 
oamSubmitForm('reportList','reportList:demoTable:1:_id60');" 
id="reportList:demoTable:1:_id60">Toggle 1</a></td></tr>
                <tr><td colspan="1"><span id="reportList:demoTable:0:otid_" 
title="T_1">V_1</span></td></tr>
</tbody></table>

Expected output:

<table id="reportList:demoTable">
<thead><tr><th>Header</th></tr></thead>
<tbody id="reportList:demoTable:tbody_element">
        <tr><td><a href="#" onclick="return 
oamSubmitForm('reportList','reportList:demoTable:0:_id60');" 
id="reportList:demoTable:0:_id60">Toggle 0</a></td></tr>
                <tr><td colspan="1"><span id="reportList:demoTable:0:otid_0" 
title="T_0">V_0</span></td></tr>
        <tr><td><a href="#" onclick="return 
oamSubmitForm('reportList','reportList:demoTable:1:_id60');" 
id="reportList:demoTable:1:_id60">Toggle 1</a></td></tr>
                <tr><td colspan="1"><span id="reportList:demoTable:1:otid_1" 
title="T_1">V_1</span></td></tr>
</tbody></table>

Ntice the different IDs of the detailStamp span 
(id="reportList:demoTable:0:otid_0" vs. "reportList:demoTable:0:otid").

This error also influences the "t:inputCalendar" component, and irritates the 
"t:updateActionListener" of a "t:commandLink".
                
> Auto-ID-generation does not respect rowIndex in facet="detailStamp"
> -------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1615
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1615
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.11
>         Environment: JSF 1.1, MyFaces 1.1.5
>            Reporter: Achim Hensel
>
> Generated IDs of components in a facet="detailStamp" of a t:dataTable are 
> assigned the same row index for all rows. For each ID, the row index "0" of 
> the first row is used.
> Furthermore the content of the variable "rowIndexVar" is empty, when it is 
> used in the id-attribute. It is _not_ empty for e.g. the attributes "title" 
> or "value".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to