Enabling Table Functions
You can enable the following table functions:
Fast row selection
Fast row creation
Note
For these functions, you must carry out the following additional development activities on a project basis.
To append rows at the end of the table, proceed as follows:
Add attribute row_template to the context node of the table view.
If you are modifying an existing button, remove attribute on_click from the button definition and add attribute on_client_click. If you wish to append more than one row when the button is chosen, change the
call to the cl_thtmlb_util=>get_table_row_creation_event by passing parameter iv_number_of_rows.
Set the create_status
of the newly appended rows in your append event handler to true
.
Remove any code that is related to maintaining cellerator tag attribute visibleFirstRow.
To insert rows above the last selected row, proceed as follows:
Add attribute row_template to the context node of the table view and pass parameter iv_mode as INSERT.
If you are modifying an existing button, remove attribute on_click from the button definition and add attribute on_client_click. If you wish to insert more than one row when the button is chosen, change the
call to the cl_thtmlb_util=>get_table_row_creation_event by passing parameter iv_number_of_rows.
Retrieve the index in which rows should be inserted and set the create_status
of the newly inserted rows in your insert event handler to true
.
Remove any code that is related to maintaining cellerator tag attribute visibleFirstRow.
To enable fast row selection, proceed as follows:
In file .htm
, remove attribute onRowSelection from the table or tree tag.
Specify for the tag which toolbar button is enabled when 0, 1 or n rows are selected. Toolbar buttons can be enabled when 0, 1 or n rows are selected. Enhance the code where the button table is built to be passed to attribute actions
of configTable or configTree.
You can use the constants that are predefined in class CL_THTMLB_BUTTON
and assign them to attribute frontend_states.
In method do_handle_data of the view controller, call method mark_selected_rows
for the relevant context node.
Note
iv_id: The table ID passed to tag configTable or configTree must be identical with the table ID in file .htm
.