Hello,
you can use tc:link instead of button and get the current row with from
the table or from the UIParam.
<tc:column label="Spaltenname 1" sortable="false" align="left">
<tc:link label="#{rowData.value}"
actionListener="#{testForm.click}" >
<f:parameter name="value" value="#{rowData.value}"/>
</tc:link>
</tc:column>
in the actionListener you can get the value:
UICommand link = (UICommand)actionEvent.getComponent();
UIParameter param = (UIParameter)link.getChildren().get(0); // there
is no other child
Object value = param.getValue();
in a action you can get the current row from the tc:sheet component binding
table // is the componentbinding to the table
Object row = table.getRowData();
the return value depends on the DataModel
Regards
Bernd
[EMAIL PROTECTED] wrote:
Hi!
I want to diplay master/detail data in one single page. I have got an
overview list (tc:sheet) and an area (tc:box) to display the detail
data for the currently selected row in the list. But I know, there's no
selectionChangeListener for tc:sheet (and will not be in the near future?).
So it is impossible, to display the detail data with a single click on
the row. You have to select the row first and than you must click some
other button.
As workaround, I've added a button on *every* row of the list. When the
users clicks the button, the detail data can be updated. But unfortunally,
I've found no way, to pass the the number or id of the current row, the
row of the button clicked, to the action or actionListener of the button.
I found a similiar question in the mailing list archiv posted by ChrisA
in June. The answer was to look at the addressbook example. But this
doesn't help, because this is the "two-click-solution" I mentioned.
Is there any simple solution for this simple Problem?
Thanks for any help
Helmut