File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes datatable commandlink action method called for each row Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "datatable commandlink action method called for each row" Watch "datatable commandlink action method called for each row" New topic

datatable commandlink action method called for each row

Jeremy Wilson
Ranch Hand

Joined: Feb 18, 2003
Posts: 166
I must give credit to another question on the Sun JSF Forums to punishervanka. But I have the same question and it is not being answered there and want to try here. Any information would be wonderful. And an outputLink will not work here, I don't want a cheesy work around for this.

When I click on the link in the datatable the action method is called for all the rows in the table.
By reading the forums on this topic I thought this was the method to find out the row index in the table.
I also tried value binding datatable to UIData in the backing bean and using getRowData in the action method. then also the action method was called once for each row.

what am I doing wrong.

please help me


[Edited for code tags a to lose smilies. Gregg Bolinger]
[ May 12, 2005: Message edited by: Gregg Bolinger ]

Jeremy Wilson
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286

I edited your thread to get rid of the smilies. When you post code be sure and check the checkbox to disable smilies. Espeicially with JSF tags. Also, please put Code Tags around your code so it keeps formatting and is easier to read.

GenRocket - A Test Data Generation Platform
I agree. Here's the link:
subject: datatable commandlink action method called for each row
Similar Threads
Input row select on data table does not get called
Unable to call Action Methof
datatable with sorting in jsf
Action method not getting called inside the dataTable
passing parameters from JSF to Java class and JSF to JSF