在我的 webdynpro 中,当我单击按钮时,我不想获取按钮的工具提示并将其用作弹出窗口的标题。
method WDDOMODIFYVIEW .
"write view to attribute so it can be accessed from other methods.
wd_this->DETAILVIEW = view.
endmethod.
.
method ONACTIONOPENDIALOG .
data lv_title type string.
data lv_buttonID type string.
data lv_button type ref to if_wd_view_element.
buttonID = wdevent->get_string( name = 'ID' ).
button = wd_this->detailview->get_element( lv_buttonid ).
call method cl_fitv_wd_util=>UI_GET_PROPERTY(
exporting
io_view = wd_this->detailview
io_view_element = lv_button
iv_id = buttonid
iv_property_name = 'TOOLTIP'
importing
ev_value = lv_title ).
wd_this->dopopup( title = lv_title ).
endmethod.
UI_GET_PROPERTY 方法无法获取工具提示。可能是因为它试图在 if_wd_view_element 而不是 cl_wd_button 上调用方法 GET_TOOLTIP。这是此方法中的错误吗?有没有办法将 if_wd_view_element 转换为 cl_wd_button?