Normally, if you don't specify one, sequential indexes are generated. This can lead to out-of-sync problem if someone else deletes of insert some records while the dataTable is displayed. Don't know why yours is fixed to "data".. you have set a lot of forceIdIndex, forceId, indexVar etc... try to start from scratch with only the forceIdIndexFormula one.
Cosma
2006/6/7, Joel Wilson <[EMAIL PROTECTED]>:
You need to have the action that is being called be on the object in the list not in the backing bean. I use that technique with a custom dataSource i created for Hibernate.On Jun 6, 2006, at 3:32 PM, Michael H. Chang wrote:I am using tomahawk dataTable and dataScroller tags to display results retrieved from database. For each row, I would like to have a button that will edit a value associated with that particular row. But the JSF gave all rows on the page same id, when I press one button, every row was fired off. Any suggestion is highly appreciated.
Here is my code:
<t:dataTable id="data" styleClass="TabForegroundColor" headerClass="standardTable_Header" footerClass="standardTable_Header"
rowClasses="AltRows1, AltRows2"
columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
var="bl" value="#{ctReportdatahandler.ctReportModel}"
rows="#{ctReportdatahandler.noOfRows }"
rowIndexVar="index"
forceId="true" forceIdIndex="true"
sortColumn="#{ctReportdatahandler.sort}"
sortAscending="#{ctReportdatahandler.ascending}" preserveSort="true">
<t:column>
<f:facet name="header">
<h:outputText value="" />
</f:facet>
<h:commandButton value="h" actionListener="{ctReportdatahandler.historyCtBarcodes }" action="" styleClass="Button" /> </t:column>
Incorrect source:
<tr class="AltRows1"><td class="standardTable_Column"><input id ="_id26:data:_id29" name="_id26:data:_id29" type="submit" value="h" class="Button" /></td></tr>
<tr class="AltRows1"><td class="standardTable_Column"><input id="_id26:data:_id29" name="_id26:data:_id29" type="submit" value="h" class="Button" /></td></tr>
Both buttons are _id26:data:_id29, I expect the first row _id26:data0:_id29 and 2nd row _id26:data1:_id29 so if I press button for row 0, row1 button won't get fired off.
Michael H. Chang
2-1148Joel WilsonWeb Application Developer/Architect---------------------Skype: Jesfrk7Skype: 321.285.7470
Cell: 321.332.4654Office: 407.677.8514Fax: 407.677.8610---------------------1964 Howell Branch RoadSuite 102Winter Park, Florida 32792---------------------Changing the world, one byte at a time . . .![]()

