cancel
Showing results for 
Search instead for 
Did you mean: 

Closing the browser window, after the dialog box

Former Member
0 Kudos

Hi

Now we have used the instructions from this [blog|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6687] [original link is broken] [original link is broken] [original link is broken]; storing an HTML page in the MIME repository.

The problem is this dialog box which asks you to confirm the close operation. If you press 'No' it shows a blank page instead of the WDA. We can go back using the back button of the IE but is there anyway you could do that automatically ?

Pushpraj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

How are you handling the 'NO' scenario ?

Moreover are u firing the plug even before popping up the message ? Please check this once.. it might be the cause for it.

Former Member
0 Kudos

Hi

We don't know how to handle the clicking of No. How to do that?

The dialog box appears after we fire the exit plug.

Pushpraj

Former Member
0 Kudos

Hi,

Ideally, the plug should be fired only after you click on 'YES'.

See this is how your scenario is behaving.

1. In the current screen you click exit(or whatever you have named)

2. This click fires the exit plug (which takes you out of the WDy application first)

3. Then it pops up a dialog box asking for your approval

4. If you say 'Yes', well and good the exit has already happened.

5. The problem arises when you say 'No'. Since the exit has already happened, you cannot programmatically go back to the

parent screen.

There might be 2 solutions to this.

1. Within the current behaviour, handle the 'NO' scenario. What i am trying to say here is, when the user clicks 'NO' somehow programmatically navigate to the parent page (This is not the right way to do it)

OR

2. Make sure that the confirmation dialog opens up immedialtely after you click exit (without firing the plug) and only when the user clicks 'YES' then fire the plug. This will save you from handling the 'NO' situation.

Edited by: Pramod M on Jan 7, 2010 8:17 AM

Former Member
0 Kudos

Ok, but where exactly do you code to handle the clicking of 'No' ?

Former Member
0 Kudos

Are you popping up the confirmation dialog from a WD application ?

If so there will be a handler method for action 'NO' very similar to the following :


    CALL METHOD window->subscribe_to_button_event
      EXPORTING
        button            = if_wd_window=>co_button_yes               " For the button YES
        button_text       = <button_text>
        tooltip           = <tooltip_text>
        action_name       = 'YES_ACTION'                                  " Handler action for YES. Ideally the plug should be fired here
        action_view       = view_controller
        is_default_button = abap_true.

    CALL METHOD window->subscribe_to_button_event
      EXPORTING
        button            = if_wd_window=>co_button_no
        button_text       = <button_text>
        tooltip           =  <tooltip_text>
        action_name       = 'CANCEL_ACTION'                            " Handler action for NO
        action_view       = view_controller
        is_default_button = abap_false.

The handler method for action CANCEL_ACTION will be ONACTIONCANCEL_ACTION. The handling should be done there.

Former Member
0 Kudos

Pramod

The pop up is from IE.

Anyway I found an HTML code on the net which sort of resolves the issue.

Two points for you anyway.

Pushpraj

Former Member
0 Kudos

Hi

I am facing same problem.

Can u pls guide me how did u resolve it.

Thanks

Harsimran