on 02-18-2014 8:47 AM
Hi Experts,
i have a requirement to catch the broser button (back,refresh ) in my webdynpro applicaiton, so that when user click on any of these buttons i want to display a warning message .. that user may loose his or her data if continues..
Please let me know if this is possible in webdynpro.
Thanks & Regards,
Tashi
Hi Tashi,
This can be done by using work protect mode in WDA
Please refer the below documents
Work Protect Mode (SAP Library - Web Dynpro for ABAP)
Also, search in Google by term "work protect mode in webdynpro abap", you may find some examples.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately the answer again is No! you have to follow the one mentioned in my earlier replies
Regards,
Kiran
Hi Katrice,
I checked your thread and its definitely the same end solution i want to implement.However i am not sure how to use this interface.
i have implemented it in my component and i saw a method is_dirty added into the controller.
But from here onwards.. i dont know how to set the dirty flag and how the whole implementation is done. I will really appreciate if you can help me out on the implementation part (sample code will be very useful).
Thanks & Regards,
Tashi
Hi Katrice,
i have used this code in view init method:
data L_COMPONENTCONTROLLER type ref to IG_COMPONENTCONTROLLER .
data L_API_COMPONENTCONTROLLER type ref to IF_WD_COMPONENT.
data L_PORTAL_MANAGER type ref to IF_WD_PORTAL_INTEGRATION.
L_COMPONENTCONTROLLER = WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
L_API_COMPONENTCONTROLLER = L_COMPONENTCONTROLLER->WD_GET_API( ).
L_PORTAL_MANAGER = L_API_COMPONENTCONTROLLER->GET_PORTAL_MANAGER( ).
call method L_PORTAL_MANAGER->SET_WORK_PROTECT_MODE
exporting
MODE = 'BOTH' .
then i have a button to make data dirty (button for trial sake) and i have included this code.
data L_COMPONENTCONTROLLER type ref to IG_COMPONENTCONTROLLER .
data L_API_COMPONENTCONTROLLER type ref to IF_WD_COMPONENT.
data L_PORTAL_MANAGER type ref to IF_WD_PORTAL_INTEGRATION.
L_COMPONENTCONTROLLER = WD_THIS->GET_COMPONENTCONTROLLER_CTR( ).
L_API_COMPONENTCONTROLLER = L_COMPONENTCONTROLLER->WD_GET_API( ).
L_PORTAL_MANAGER = L_API_COMPONENTCONTROLLER->GET_PORTAL_MANAGER( ).
call method L_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG
exporting
DIRTY_FLAG = abap_true .
i have included the code in your thread for method need_confirmation generated by implementing IF_FPM_UI_BUILDING_BLOCK.
CASE io_event->mv_event_id.
WHEN 'FPM_CLOSE'. "
eo_confirmation_request = cl_fpm_confirmation_request=>go_data_loss.
ENDCASE.
Please help.
Tashi
Hi,
You cannot control the close functionality by using because these buttons are browser buttons and you cannot have control on that buttons. Instead, you can give one FPM button by name Close in FPM Toolbar with event id and on click of that button, write the code which i've shown in my earlier post.
Thanks
Katrice
Hi Katrice,
i am getting the pop up by using the buttons in the applicaiton, however i want to clarify the following doubts i have:
1) Is it possible to catch browser button events in webdynpro applicaiton
2) i cant see "Close" button in the tool bar element, though i can rename the buttons but i cant change the event ID.
Please help me understand .
Your help is always appreciated !
Regards,
Tashi
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.