On 3/29/06, fischman_98 <[EMAIL PROTECTED]> wrote:
> Can someone help me make a nxn dataTable using myFaces. I want 3 columns
> and n number of rows) Trying to use Tomahawk t:dataTable and t:columns,
> can't work it all out. Can't figure out how to loop through the rows and
> only show the number of columns I want to display. Thanks.
Do the columns displayed change? If not, then you only need a regular
h:dataTable and h:column. (Of course, you can also use the
t:dataTable/t:column for extra functionality, but you don't have to do
so).
ie,
<h:dataTable value="#{yourBean.yourRowModel}" var="rowObject">
<h:column id="column1" .../>
<h:column id="column2" .../>
<h:column id="column3" .../>
</h:dataTable>
If the columns are dynamic, then you'd need to use t:dataTable and
t:columns (with an "s").
<t:dataTable value="#{yourBean.yourRowModel}" var="rowObject">
<t:columns value="#{yourBean.yourColumnModel}" var="columnObject" />
</h:dataTable>