cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a modal dialog?

Former Member
0 Kudos

hi,

i'm trying to create a popup window using "create_popup_to_confirm ". i have registered the event handlers for the 'yes' and 'no' actions.

my program flow should depend on the result of the popup windows. so, in the event handlers, i'm setting the flags and reading them in my method to determine the flow.

the problem is that, webdynpro does not show the popup window sometimes. and even if it shows the popup window, the code after the create_popup is being executed before the user chooses yes/no.

please clarify as to how this can be fixed. i want the popup to behave as a modal dialog and the code inside the method should get executed only after the user chooses an option.

regards,

ramalingam

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello All,

When the user clicks on a button I am displaying the popup window. But I am unable to trace the event, when the user clicks on Ok or Cancel button on the popup window. The code I wrote in the windoopen method is,

window_descr->window->set_window_title( 'Select Activity Type' ).

window_descr->window->set_remove_on_close( abap_true ).

window_descr->window->set_close_in_any_case( abap_false ).

window_descr->window->set_button_kind( if_wd_window=>co_buttons_okcancel ).

Please suggest how to implement the logice in those events. Thanks in advance.

Regards,

Anand

Former Member
0 Kudos

Hi Ramalingam.

The code will always be executed after you have called the open popup method.

You have to build your logic accordingly. So you have to open the pop up and

return directly or use if else statement. The rest of the logic should be triggered from you event handler methods.

e.g.:


if something eq abap_true.
  window->popup( ).
else.
  some other stuff ..
endif.

Hope this helps.

Cheers,

Sascha

Former Member
0 Kudos

Hi Ramlingam,

Please go through example Give by SAP .

WDR_TEST_CHAT .In that they have shown pop up .Trace that code.It will help you a lot.

Chheer

Parry

Former Member
0 Kudos

Hi Parry,

in the chat component, they have used a new view for the login information. i want to use the built-in confirmation popups as a modal dialog.

regards,

ram

Former Member
0 Kudos

Hi again.

Could you pls post the code you use to create the popup?

Just to find out, why it does not open sometimes.

Cheers,

Sascha

Former Member
0 Kudos

hi sascha,

this problem was fixed. now, i write the code in the event handlers.

cheers,

ram