Java Reference
In-Depth Information
The action listener method for the Update button can be generated by double-
clicking on it.
public String updateButton_action() {
RowKey rowKey = tableRowGroup1.getRowKey();
Customer[] customerArray =
getSessionBean1().getCustomerArray();
Customer selectedCustomer =
customerArray[Integer.parseInt(rowKey.getRowId())];
setValue("#{sessionScope.Customer}",
selectedCustomer);
return "editCustomer";
}
In this method we need to find for which row the Update button was pressed,
therefore we need to reference the TableRowGroup instance corresponding to the
<webuijsf:tableRowGroup> tag in our page. The simplest way to bind the tag to
an instance variable of the appropriate type in our managed bean is to click on
the tableRowGroup1 component in the Navigator window and select Add
Binding Attribute .
 
Search WWH ::




Custom Search