Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Christoph Dahlen - 08 Sep 2006 15:11 GMT
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
cicap - 08 Sep 2006 19:33 GMT
> 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:outputText 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.
cicap - 08 Sep 2006 19:38 GMT
> <h:dataTable binding="table"...>

binding="#{bean.table}"....
Christoph Dahlen - 09 Sep 2006 08:49 GMT
cicap schrieb:

>> <h:dataTable binding="table"...>

> binding="#{bean.table}"....

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

Thanks

Gruss,

    Christoph


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.