Show TOC Start of Content Area

Syntax documentation onRowSelection  Locate the document in its SAP Library structure

The event is fired when the user clicks on the radio button in the first column. The radio button is visible when the 'selectionMode' is set to "SINGLESELECT".

 

Example

using the taglib

import com.sap.htmlb.enum.TableSelectionMode;
..

/* Get the tableView component */
    
TableView table = (TableView) this.getComponentByName("myTableView");

    
/* Set the onHeaderClick event */
    
table.setSelectionMode(TableSelectionMode.SINGLESELECT);
    table.setOnRowSelection(
"onRowSelClick");
    ..

    
/*  the method onRowSelClick has to be declared in the DynPage.

        Otherwise an exception is thrown ("method not found") when the

        user clicks on the radio button of the tableView.
    
        Declaring onHeaderClick: */
public void onRowSelClick(Event event) {
    System.out.println(
"Row selection click");
}

 

 

onClientRowSelection

The selected row can also be determined on the client by using the htmlbevent object.

 For JS there are a few API calls available to get to the key.

 

JavaScript Example:

htmlbevent.obj.getClickedRowKey();

 

For more information see JavaScript API.

 

 

End of Content Area