Display exception on the popup screen itself

Hi All,

I have designed a popup screen in which I am taking some input fields and then submit. After clicking submit I am calling a REST API where I am validating the data I entered is correct or not. So if the data is incorrect, API throws an exception and feedback message is displayed but the popup gets closed. So here I want that the feedback should be displayed but the popup should not get closed.

So Please suggest a approach here How to proceed? as I don't want to change the API because its in other module and used in other screens also. I don't want to use the OnAfterResponse method as it will change the logic for other screens as well.

I am using the below feedback action and the popup is closing, whenever the exception is occurred.

Hi Kaustubh,

Try change the end, for current screen, example:

Regards.

Hi,


Do you have the button that submit the action with this properties? (Method: Ajax Submit | Validation: Server)



Hope this can help.


Best regards,

Ricardo M Pereira

Ricardo Pereira wrote:

Hi,


Do you have the button that submit the action with this properties? (Method: Ajax Submit | Validation: Server)



Hope this can help.


Best regards,

Ricardo M Pereira

 

 Hi Ricardo,

I tried this method but it is not working. When the exception is received from the API the control directly goes to the ALLEXCEPTION->feedbackmessage->end and the popup gets closed.

Regards,

Kaustubh Kamble

Agno Silveira wrote:

Hi Kaustubh,

Try change the end, for current screen, example:

Regards.

 

 Hi Agno,

I have tried the method but the feedback message is not displayed and all the input fields I entered become blank. My issue is I don't want to close the popup window when exception is thrown from API and display the feedback message also.

Regards,

Kaustubh

Hi Kaustubh,


I'm assuming you are using popup editor in traditional web ??  If so, see attached oml, an exception occuring while on a popup window, is no reason to close it.  

So the problem must be somewhere else.  Can you elaborate on how you are calling this REST api.  You say that it throws an exception ???  I'm not sure, but I don't think exceptions carry across API calls, so can you show more detail about where and how you call this api and what information the API gives back as far as error information is concerned.

Dorine