[JSF] <h:dataTable> - row index available?

  • Thread starter Christoph Dahlen
  • Start date
C

Christoph Dahlen

Hi,

I wonder wether <h:dataTable> offers a attribute, similar to the
"varStatus" attribute of JSTL's <c:forEach> or <c:forItems> loop? I need
to include the current row index into the generated output.

Any hint?

Christoph
 
C

cicap

Christoph Dahlen said:
Hi,

I wonder wether <h:dataTable> offers a attribute, similar to the
"varStatus" attribute of JSTL's <c:forEach> or <c:forItems> loop? I need
to include the current row index into the generated output.

No.
Anyway you can use databinding:

<h:dataTable binding="table"...>
....
Row index: <h:eek:utputText value="#{table.rowIndex}"/>

</h:dataTable>

tomawhak has such a property AFAIK.

p.s.

I don't use binding usually, because it's quite a risk with session scoped
bean.
 
C

Christoph Dahlen

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
binding="#{bean.table}"....

Ah, finally understood the purpose of the binding attribute ...

Thanks

Gruss,

Christoph

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFAnIbX94TMRoWcFYRAhvgAJ0SDDzZ6CTSUYMPCdBSkRIqhUH74ACg3Hrg
u064YrSUaz8PhpqwGdkeqlo=
=hFp2
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top