abap - 无法选择表格视图中的行
问题描述
我有一个包含一些数据的表格视图。我在 PopUp 中使用它来选择行,但是每次当我单击某行时,它都集中在第一行而不改变。我该如何解决这个问题?我的意思是,当我点击某行时,焦点应该在我选择的行上。
这是我的代码.htm
:
<%@page language="abap" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%
* Conversion Cnode SelectionMode to Tag
data: lv_cellerator_selectionmode type string,
lv_cellerator_editmode type string,
lv_cellerator_selectioncolumn type string.
cl_thtmlb_util=>translate_selection_mode(
exporting
iv_selection_mode = CAMPTYPE->SELECTION_MODE
iv_all_rows_editable = space
importing
ev_selection_mode = lv_cellerator_selectionmode
ev_edit_mode = lv_cellerator_editmode
ev_selection_column = lv_cellerator_selectioncolumn ).
%>
<chtmlb:configCellerator downloadToExcel = "FALSE"
editMode = "NONE"
id = "ConfCellTable"
onRowSelection = "select"
personalizable = "FALSE"
selectedRowIndex = "<%= CAMPTYPE->SELECTED_INDEX %>"
selectedRowIndexTable = "<%= CAMPTYPE->SELECTION_TAB %>"
selectionColumn = "<%= lv_cellerator_selectioncolumn %>"
selectionMode = "<%= lv_cellerator_selectionmode %>"
<%-- selectionMode = "SINGLE"--%>
table = "//CAMPTYPE/Table"
usage = "EDITLIST"
visibleFirstRow = "<%= CAMPTYPE->VISIBLE_FIRST_ROW_INDEX %>"
visibleRowCount = "10"
width = "100%"
xml = "<%= controller->configuration_descr->get_config_data( ) %>" />
解决方案
<%@page language="abap" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%
* Conversion Cnode SelectionMode to Tag
data: lv_cellerator_selectionmode type string,
lv_cellerator_editmode type string,
lv_cellerator_selectioncolumn type string.
cl_thtmlb_util=>translate_selection_mode(
exporting
iv_selection_mode = CAMPTYPE->SELECTION_MODE
iv_all_rows_editable = space
importing
ev_selection_mode = lv_cellerator_selectionmode
ev_edit_mode = lv_cellerator_editmode
ev_selection_column = lv_cellerator_selectioncolumn ).
DATA: lv_excel TYPE string.
lv_excel = abap_false.
<chtmlb:configCellerator downloadToExcel = "<%= lv_excel %>"
editMode = "NONE"
id = "ConfCellTable"
onRowSelection = "select"
personalizable = "FALSE"
selectedRowIndexTable = "<%= CAMPTYPE->SELECTION_TAB %>"
selectionColumn = "<%= lv_cellerator_selectioncolumn %>"
selectionMode = "SINGLE"
table = "//CAMPTYPE/Table"
usage = "ASSIGNMENTBLOCK"
visibleRowCount = "10"
width = "100%"
xml = "<%= controller->configuration_descr->get_config_data( ) %>" />
推荐阅读
- java - Spring boot - Hive:驱动程序不支持获取/设置网络超时
- laravel - Laravel问题在视图中加载3个带有查询的变量
- google-sheets - 共享 Google 表格中的一系列单元格以供用户编辑
- python - 如何在循环中使用 API 调用来构建 Pandas 数据框?
- javascript - 单击按钮删除所有禁用的属性
- javascript - 将 mvc 模型属性传递给 javascript
- ontology - 将本体导入 Cytoscape(3.8 桌面版)
- ruby-on-rails - 无法升级到 WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: , HTTP_UPGRADE: )
- javascript - 如何使用 mongoDB 在 mongoose 中获取特定对象?
- javascript - 解决组件的多个渲染,包括。useEffect、useState 和 Axios