Java Reference
In-Depth Information
Once again in this method we need to use the
TableRowGroup
instance we created
for the update logic. In this case we need to invoke its
getSelectedRowKeys()
method, which returns an array of
RowKey
objects corresponding to all the rows that
are selected in the table.
In our method, we iterate through the selected
RowKey
objects, and delete each
corresponding
Customer
object from the database by invoking the
remove()
method
on the
CustomerFacade
session bean, and passing said object as a parameter.
Defining Navigation Rules
At this point we have implemented the logic to be performed when each and
every button in our pages is clicked. Now all we need to do is to define navigation
rules. This can be done graphically by opening
faces-config.xml
, clicking on the
PageFlow
tab, then connecting both pages and entering the corresponding return
values for each action listener method to each connector as appropriate.