cancel
Showing results for 
Search instead for 
Did you mean: 

Popup is called too late

christian_taut
Explorer
0 Kudos

Dear collegues,

I call a WD popup method create_popup_to_confirm( ) from the

if_wd_window_manager. I have copied coding from NetWeaver Examples

in WD component WDR_TEST_POPUPS_RT_00.

Problem: the popup comes not after it was called by method open( ) but

much later in the screen flow process. Because it comes too late, I can

not handle the event "YES", "NO", "CANCEL".

Is there any kind of "flush" that forces the popup to come immediately?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

christian_taut
Explorer
0 Kudos

Hi,

this was not my problem. I try to explain my problem again:

- We have an application with 4 tabs.

- on each tab, the user can edit different data.

- if the user wants to go from tab 1 to Tab 2, I call the popup

- the Popup contains the question "You leave tab. Do you want to SAVE?"

- I call the popup in an own WD method "SAVE"

- on the end of the method, the backend is called to save the data

- I need the popup immediately. Because I need the answer Y / N.

- But the popup comes long time later.

- Popup comes after my method "SAVE".

- > I can NOT handle the result of the popup.

- Because I need the result of the popup inside my method "SAVE"

Could you understand? If not, I can give more details.

Best regards, Christian

Former Member
0 Kudos

Hi Christian,

I think you are doing everything inside your one method "SAVE" which is not the correct way to go about.Instead you can go as under:

Suppose in you view ,say "XYZ1", you have an event handler which will be called when user clicks on another tab,now inside this event handler you create an instance of window manager and call the CREATE_WINDOW method.

For this method there is a parameter called WINDOW_NAME to which you must be passing the name name of window(additional window apart from main one) and to this window you must have embedded some view.

As soon as you call the <b>open( )</b> method of window the control calls the WDDOINIT method of the embeded view(here you must subscribe to the events as per the buttons defined in your window).

For 3 different actions create 3 event handlers and suppose user clicks on YES button then in corresponding event handler,save the data to database and then close the window and navigate to the next tab.

Please check if you are missing something among these steps,otherwise everthing should work fine.

Thanks

Aditya

Former Member
0 Kudos

Hi Christian,

I suppose You are not subscribing to the "Yes" "No" and "Cancel" in WDDOINIT method of the view you are calling thats why you are not able to handle the corresponding events and after subscribing you need to handle the events in the corresponding Event handler methods(you might close the pop-up or do some processing inside those event handler methods).

If this is not the problem then please share what you have written inside the WDDOINIT method or describe your problem with coding in more detail.

Thanks

Aditya