cancel
Showing results for 
Search instead for 
Did you mean: 

E-Recruitment Job search Popup blocker remove automatically

kumar_kiran2
Participant
0 Kudos

Hi All,

I know this is something different, I have a requirement that when user search on the job when they click on open any job link in browser corner it shows popup blocked click to always allow then it works perfectly. My requirement is it should not ask at any point popup block option as soon as they click the link new page should open. As this popup option is individual laptop/pc setting I am not sure how can I prevent from backend not to ask everyone. Please help me with this.

Note this is standard code not enhanced.

WDA: HRRCF_C_SEARCH_UI and View is VW_EMP_HITLIST

Action method: ONACTIONOPEN_DATA_OVERVIEW

Inside this class: * open data overview of the posting instance

wd_comp_controller->show_data_overview

using below to open

* open window
lo_window->open( ).

Is there any other way we can avoid this.

popup.png

Full code

method show_data_overview .

data: node_hrrcf_job_hitlist type ref to if_wd_context_node,
node_job_hits type ref to if_wd_context_node,
elem_job_hits type ref to if_wd_context_element,
lt_element_set type wdr_context_element_set,
ls_job_hits type rcf_s_mdl_jobs_srch_hitlist.

data: lo_window type ref to if_wd_window,
lo_cmp_api type ref to if_wd_component,
lo_window_manager type ref to if_wd_window_manager,
lv_application_name type string,
lv_url type string.

data: lo_nd_posting_app_unregemp type ref to if_wd_context_node,
lo_el_posting_app_unregemp type ref to if_wd_context_element,
lv_appl_config_id type wdy_config_id.

data: lt_parameters type tihttpnvp,
ls_parameters type ihttpnvp.

CONSTANTS: lc_prm_cand_type_int TYPE string VALUE 'INT',
lc_prm_cand_type_ext type string value 'EXT'.

* set lead selection in accordance to the posting instance whose data overview should be shown
node_hrrcf_job_hitlist = wd_context->get_child_node( name = if_componentcontroller=>wdctx_hrrcf_job_hitlist ).
node_job_hits = node_hrrcf_job_hitlist->get_child_node( name = if_componentcontroller=>wdctx_job_hits ).

elem_job_hits = node_job_hits->get_element( ).

if elem_job_hits is not initial.

elem_job_hits->get_static_attributes(
importing
static_attributes = ls_job_hits ).

endif.

if ( elem_job_hits is initial ) or
( ls_job_hits is initial ) or
( ls_job_hits-pinst_guid ne iv_pinst_guid ).

lt_element_set = node_job_hits->get_elements( ).

loop at lt_element_set into elem_job_hits.

elem_job_hits->get_static_attributes(
importing
static_attributes = ls_job_hits ).

if ls_job_hits-pinst_guid eq iv_pinst_guid.

node_job_hits->set_lead_selection(
exporting
element = elem_job_hits ).

exit.

endif.

clear: elem_job_hits,
ls_job_hits.

endloop.

endif.

* get window manager
lo_cmp_api = wd_this->wd_get_api( ).
lo_window_manager = lo_cmp_api->get_window_manager( ).

* append pinst_guid value to the parameter table
ls_parameters-name = 'POST_INST_GUID'.
ls_parameters-value = iv_pinst_guid.
APPEND ls_parameters TO lt_parameters.

* check for service user to determine the correct application
CALL FUNCTION 'SUSR_USER_IS_SERVICETYPE'
exporting
user_name = sy-uname
exceptions
user_name_not_exists = 1
user_is_not_servicetype = 2
others = 3.

if sy-subrc = 2.

if cl_hrrcf_wd_services=>is_external_candidate( ) = abap_true.

lv_application_name = 'HRRCF_A_POSTING_APPLY_EXT'.

* append cand_type value to the parameter table
ls_parameters-name = 'CAND_TYPE'.
ls_parameters-value = lc_prm_cand_type_ext.
append ls_parameters to lt_parameters.

else.

lv_application_name = 'HRRCF_A_POSTING_APPLY_INT'.

* append cand_type value to the parameter table
ls_parameters-name = 'CAND_TYPE'.
ls_parameters-value = lc_prm_cand_type_int.
append ls_parameters to lt_parameters.

endif.

else.

if wd_this->gv_search_task eq cl_hrrcf_wd_ui_constants=>gc_task_unregemp_srch.

lv_application_name = 'HRRCF_A_POSTING_APPLY_EMP'. "N1374543

* get the correct application configuration ID
lo_nd_posting_app_unregemp = wd_context->get_child_node( name = wd_this->wdctx_posting_app_unregemp ).
lo_el_posting_app_unregemp = lo_nd_posting_app_unregemp->get_element( ).
lo_el_posting_app_unregemp->get_attribute(
exporting
name = 'APPLICATION_CONFIGURATION_ID'
importing
value = lv_appl_config_id ).

if lv_appl_config_id is not initial.
ls_parameters-name = 'sap-wd-configId'. "#EC NOTEXT
ls_parameters-value = lv_appl_config_id.
append ls_parameters to lt_parameters.
endif.

* append cand_type value to the parameter table
ls_parameters-name = 'CAND_TYPE'.
ls_parameters-value = lc_prm_cand_type_int.
append ls_parameters to lt_parameters.

elseif wd_this->gv_search_task eq cl_hrrcf_wd_ui_constants=>gc_task_unreg_srch.

lv_application_name = 'HRRCF_A_POSTING_APPLY'.

* append cand_type value to the parameter table
ls_parameters-name = 'CAND_TYPE'.
ls_parameters-value = lc_prm_cand_type_ext.
append ls_parameters to lt_parameters.

endif.

endif.

* generate the URL
cl_hrrcf_wd_services=>construct_wd_url(
exporting
iv_application_name = lv_application_name
it_parameters = lt_parameters
receiving
rv_url = lv_url ).

* create external window
lo_window_manager->create_external_window(
exporting
url = lv_url
title = iv_post_title
has_menubar = abap_true "N1304662
has_statusbar = abap_true
has_toolbar = abap_true
has_location = abap_true
receiving
window = lo_window ).

* show warning message
wd_this->show_popup( ). "N1313803

* open window
lo_window->open( ).

endmethod.

Thank you,

Accepted Solutions (1)

Accepted Solutions (1)

pokrakam
Active Contributor

This has nothing to do with Web Dynpro, but is a local browser behaviour. Note also that your connection is showing as "Not secure", so that is possibly why the browser is blocking popups. You would not normally run a productive site that way.

It might be that your development system is intentionally set up this way, and you can ignore the popup request as this is not how the live app will behave. But at the very least your test/QA environment should be using https and you should use that as reference. If you want to set https by default in your dev system, please talk to your basis people to configure this.

kumar_kiran2
Participant
0 Kudos

Thanks Mike, I will check with Basis as you suggested.

Answers (0)