
METHOD get_p_thtmlb_oca.
CASE iv_property.
WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
rv_value = cl_bsp_dlc_view_descriptor=>field_type_oca.
WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
rv_value = 'PREVIEW'.
ENDCASE.
ENDMETHOD.
METHOD eh_onpreview.
DATA: lv_event TYPE REF TO cl_htmlb_event_tableview.
lv_event ?= htmlb_event.
me->typed_context->searchresult->eh_on_one_click_action(
iv_htmlb_event = lv_event
iv_htmlb_event_ex = htmlb_event_ex ).
ENDMETHOD.
METHOD eh_on_one_click_action.
DATA: lv_event TYPE string,
lv_index TYPE string,
lr_col TYPE REF TO cl_crm_bol_entity.
SPLIT iv_htmlb_event_ex->event_defined AT '.' INTO lv_event lv_index.
me->get_bo_by_index( conv #( lv_index ) ).
lr_col ?= me->collection_wrapper->get_current( ).
CHECK lr_col IS NOT INITIAL.
CASE lv_event.
WHEN 'PREVIEW'.
mr_owner->open_pdf( lr_col ).
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
METHOD open_pdf.
DATA(lv_uuid) = ir_bol->get_property_as_string( 'UUID' ).
CONCATENATE 'uuid=' lv_uuid INTO DATA(lv_query).
DATA(lv_url) = cl_crm_web_utility=>create_url( iv_path = '/sap/crm/social_print'
iv_query = lv_query
iv_in_same_session = 'X' ).
SELECT SINGLE internal_id INTO @DATA(lv_id) FROM crmd_soc_post WHERE uuid = @lv_uuid.
DATA(lv_title) = 'Social Post preview: ' && lv_id.
DATA(lr_popup) = me->comp_controller->window_manager->create_popup( iv_interface_view_name = 'GSURLPOPUP/MainWindow'
iv_usage_name = 'CUGSURLPopup'
iv_title = lv_title ).
DATA(lr_cn) = lr_popup->get_context_node( 'PARAMS' ).
DATA(lr_obj) = lr_cn->collection_wrapper->get_current( ).
DATA(ls_params) = VALUE crmt_gsurlpopup_params( url = lv_url height = '700' ).
lr_obj->set_properties( ls_params ).
lr_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_plain ).
lr_popup->set_window_width( 700 ).
lr_popup->set_window_height( 700 ).
lr_popup->open( ).
ENDMETHOD.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |