on 10-21-2015 9:14 AM
Hi All,
I add the attribute 'GT_BUTTON' in the class and a button in DO_PREPARE_OUTPUT. Also do the coding in BSP. Now I could see the added button in the Web UI. Then the next step is to add logic when we click on it. So I create the event handle, but I don't know how to link the created event handle with the added button. Could anyone give me any hints. Thank you so much.
BR
Jay
Hi All,
Here is the details.
in the DO_PREPARE_OUTPUT:
DATA: ls_button TYPE crmt_thtmlb_button.
IF gt_button IS INITIAL.
ls_button-text = 'COPY'.
ls_button-enabled = abap_true.
ls_button-on_click = 'COPY'.
APPEND ls_button TO gt_button.
ENDIF.
typed_context->result->build_table( ).
In the event handle, I created event handle named 'COPY' and then 'EH_ONCOPY' generated.
In the Htm
<chtmlb:tableExtension tableId = "Table"
layout = "FIXED" >
<chtmlb:configTable id = "Table"
navigationMode = "BYPAGE"
onRowSelection = "<%= lv_select_event %>"
selectionMode = "<%= lv_select_mode %>"
selectedRowIndex = "<%= RESULT->SELECTED_INDEX %>"
selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
table = "//RESULT/Table"
usage = "SEARCHRESULT"
actions = "<%= controller->gt_button %>"
visibleRowCount = "<%= lv_lines %>"
downloadToExcel = "FALSE"
width = "100%"
showNoMatchText = "FALSE"
/>
</chtmlb:tableExtension>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.