cancel
Showing results for 
Search instead for 
Did you mean: 

FPM Dialog Box validation before closing popup window

sergiu_popa
Participant
0 Kudos

Hi,

I have in my application a popup(FPM dialog box) with a couple of input fields. What I want to do is to force the user to enter some data in one of the input fields before closing the popup box.

My first attempt to resolve the issue was to make the field required in the web dynpro component loaded by the UIBB in the popup. This one didn't worked; I think it's because the required function does not work with the close button in the popup window.

The next thing I tried to do was to use the FPM Message Manager and raise a message before the FPM_CLOSE_DIALOG event. This is working partially as it displays the message but only on the application page after closing the popup. What I want is to display the message in the popup and block the closing of the popup.

In other words I do not want to allow users to close the popup(with the close button,x, in the popup frame) unless they enter some data in an input field. Does anyone has any idea on how could I achieve this?

Best regards,

Sergiu

Edited by: sergiu.popa on Feb 2, 2012 12:29 PM

Accepted Solutions (1)

Accepted Solutions (1)

sergiu_popa
Participant
0 Kudos

Hi,

Eventually I got a solution to this issue.

I keep opening the popup unless that certain input field is completed. On the second display, and the ones that follow, I raise a message with the FPM Message Manager and in this way I get to show a message to the user.

Regards,

Sergiu

sergiu_popa
Participant
0 Kudos

Hi,

Eventually I found a more elegant solution to this problem:

On FPM_CLOSE_DIALOG event, do your checks and if something is not right display a message. Then, instead of keep calling the popup, you can use method CANCEL_EVENT (IF_FPM_OVP/OIF/GAF) of OVP/OIF/GAF instance to stop the FPM Event Loop.

Once the FPM Event Loop is stopped, the popup will remain on screen with messages you set.

Best regards,

Sergiu

Answers (0)