I had the same problem a while back...to get the current row index.
In my Bbean, I had a DataModel object whose rowIndex I used via a getter.
Class BBean
{
DataModel model;
public int getRowIndex()
{
model.getRowIndex();
}
....
}
And in my jsp I referred to the prop in my datatable via: #{!BBean.rowIndex}
It was the only way I found to make it work.
HTH
Mark
-----Message d'origine-----
De : Borja Mart�n [mailto:[EMAIL PROTECTED]]
Envoy� : lundi 20 d�cembre 2004 13:59
� : MyFaces Discussion
Objet : Re: dataTable and rowIndex
I also forgot to mention that I already tried it using the x:dataTable with the same result...
thanks
At 12:44 20/12/2004 -0600, you wrote:
>This is possible with the MyFaces extended Datatable component
>
>
>On Mon, 20 Dec 2004 19:45:42 +0100, Borja Mart�n <[EMAIL PROTECTED]> wrote:
> > hi,
> > is it possible to get the index number for each row while rendering
> > the dataTable in the jsp page?
> > I have the following code in the jsp page:
> > <h:dataTable
> > id="images"
> > value="#{images.list}"
> > var="image">
> > <h:column>
> > <h:outputText value="#{images.list.rowIndex" />
> > </h:column>
> > </h:dataTable>
> >
> > it will display in each row a 0 for the rowIndex value
> >
> > thanks in advance
> >
> >
>
>
>--
>-Heath Borders-Wing
>[EMAIL PROTECTED]

