Show TOC

Procedure documentationEnabling Table Functions

 

You can enable the following table functions:

  • Fast row selection

  • Fast row creation

Note Note

For these functions, you must carry out the following additional development activities on a project basis.

End of the note.

Procedure

Fast Row Creation

To append rows at the end of the table, proceed as follows:

  1. Add attribute row_template to the context node of the table view.

  2. 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.

  3. Set the create_status of the newly appended rows in your append event handler to true.

  4. Remove any code that is related to maintaining cellerator tag attribute visibleFirstRow.

To insert rows above the last selected row, proceed as follows:

  1. Add attribute row_template to the context node of the table view and pass parameter iv_mode as INSERT.

  2. 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.

  3. 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.

  4. Remove any code that is related to maintaining cellerator tag attribute visibleFirstRow.

Fast Row Selection

To enable fast row selection, proceed as follows:

  1. In file .htm , remove attribute onRowSelection from the table or tree tag.

  2. 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.

  3. In method do_handle_data of the view controller, call method mark_selected_rows for the relevant context node.

    Note Note

    iv_id: The table ID passed to tag configTable or configTree must be identical with the table ID in file .htm.

    End of the note.