I have rows that have cells with links to another page. I need to find out which individual cell link was clicked. I know I can find which row was clicked by binding a HtmlDataTable object to the DataTable on the form. But I need to know which cell in the row was clicked. Any ideas?
Not possible. You could consider to attach a f:attribute to the h:commandLink where in you specify the column identifier. The attribute value on its turn can be obtained by actionEvent.getComponent().getAttributes().get("attributename").
Inject the datamodel into a backing bean for the target page, then use the get selected row method on it.
For non-JSF target pages, one of the options available is to keep a key (such as the row number) as a column in the datamodel and supply it as a commandLink parameter.
Customer surveys are for companies who didn't pay proper attention to begin with.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Tim Holloway wrote:Inject the datamodel into a backing bean for the target page, then use the get selected row method on it.
For non-JSF target pages, one of the options available is to keep a key (such as the row number) as a column in the datamodel and supply it as a commandLink parameter.
He was not asking how to find the row object in question (he mentioned he already know how to do it), but how to find the column in question. He is using the same commandlink action in every column.