cancel
Showing results for 
Search instead for 
Did you mean: 

How to Add POPUP for user confirmation using enhancement

Former Member
0 Kudos

Hi Friends,

I am working on Travel Management System.

Component Name - FITV_FPM

In 'Create Expense Report' , when we click SaveDraft button , A popup should appear confirming action.

I enhanced method 'NAVIGATE' usin PRE_EXIT. and subscribed events OK and CANCEL.

Problem is - PRE_EXIT method of NAVIGATE metod is executed and before rendering POPUP, NAVIGATE method is also executed.

So popup comes after saving the data , so there is no use of popup.

How can we over-come this problem ?

I want popup to come before running NAVIGATE method.

Is there any alternate way , kindly suggest.

Thanks and Regards,

Lalit Singh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Lalit,

Don't enhance the FITV_FPM component.

Enhance WD component FITE_VC_GENERAL_DATA. Enhance its component controller's method ON_NAVIGATE (Post Exit) and depending on your requirement try to set value of 'rv_response'.

That means, if you want to navigate further (OK) set 'wd_this->fpm_api->gc_response_ok' for the 'rv_response' otherwise (Cancel) set 'wd_this->fpm_api->gc_response_cancel'.

Please try this and let me know if you still facing a problem.

Thanks,

Prashant

Former Member
0 Kudos

Hi Prashant,

i enhanced ON_NAVIGATE and put popup logic in PRE_EXIT and modified IV_RESPONSE in POST_EXIT using user response.

but problem is - popup appears after executing all three methods namely pre_exit, on_navigate and post_exit.

In this way , SAVE_AS_DRAFT methods of class CL_FITE_ASSISTANCE executed before the popup comes and thus there is no use of popup and user response.

Kindly suggest any way so that popup could be triggered before executing method ON_NAVIGATE so that user response could be accepted and processed.

Thanks in advance

Lalit Singh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Dialogs in Web Dynpro are never synchronous. The phase model completes before the dialog is shown. There is no way to stop the processing flow and await a response. You would need to break the flow of the logic in order for your enhancement to work.

Former Member
0 Kudos

Hi Lalit,

I think , you need to try overexit for the COMPONENTCONTROLLER method ON_SAVE where wd_assist->save_as_draft( ) is called.

Thanks,

Prashant

Former Member
0 Kudos

Thanks Thomas for valuable inputs.

Kindly suggest me any way to break the flow of logic.

i cant implement overwrite_exit due to unavailability of EHP4 as suggested by you in another thread.

Thanks,

Lalit Singh

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Kindly suggest me any way to break the flow of logic.

I couldn't say without studying this exact appliction. It is certainly a much more complex operation as you would need to cancel the current event processing and then add a new event handler for your dialog (which in turn needs to re-trigger the original event if confirmed).

Former Member
0 Kudos

Hi Thomas ,

Somehow if we might be successful to appear POPUP just after PRE_EXIT and cancel 'NAVIGATION' , then we can put 'NAVIGATION ' logic in OK eventhandler.

Current application 'Travel Management System ' is based on FPM ( FITV_FPM )and it uses 5-6 different component.

Thanks

Former Member
0 Kudos

Hi,

I have similar issue regarding popup. Did you find any solution on how to manually trigger the original event after popup message?

Thanks