Hi,

Either I'm doing something wrongg or I've come across a bug when using Alerts; I have created an Alert component called "Confirm" with two buttons, button 1 is "Yes" and button 2 is "No". I seem to be getting an inconsistent response back from the alert at runtime.

I have this small block of test PL/SQL...

   l_response := API_ALERT.getResponse('Confirm');

   API_APPLICATION.showPopupMessage('Button = '||TO_CHAR(l_response));

Here are the response I get when pressing the buttons...

Test 1

Start application and invoke alert
If I press No first, I get a NULL response
If I press No again I get 1 as the response
If I now press Yes I get 1 as the response
If I press Yes again I get 0 as the response

Test 2

Start application and invoke alert
If I press Yes first, I get a NULL response
If I press Yes again I get 0 as the response
If I now press No I get 0 as the response
If I press No again I get 1 as the response

Thanks,

Craig.

asked 09 May '13, 05:37

Craig's gravatar image

Craig
1.1k129
accept rate: 6%


Hi Craig,

It seems like your are retrieving the alert response in the same event where you are showing it, as in Oracle Forms:

api.alert.show('Confirm');
l_response := API_ALERT.getResponse('Confirm');
API_APPLICATION.showPopupMessage('Button = '||TO_CHAR(l_response));

However, the Formspider alert is different from the Forms alert. In Formspider, when an alert is showed, the framework does not wait for the alert response(does not freeze the codeflow). In Formspider, you should get the alert response at the "On Close" event of the alert. You can set an "On Close" event for an alert through its edit dialog.

For more information, you can also check the tutorial below:
http://theformspider.com/learningcenter/tutorial-9-how-to-build-an-alert/

Hope this helps,
Ibrahim

link

answered 09 May '13, 05:58

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
1.5k5
accept rate: 25%

edited 09 May '13, 05:59

Hi,

Thanks for your response.

You are correct, I was checking the response in the same block of code and this was indeed the issue; I changed as per your suggestion and it works perfectly.

Thanks,

Craig.

(09 May '13, 06:09) Craig
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×10
×5
×1

Asked: 09 May '13, 05:37

Seen: 777 times

Last updated: 09 May '13, 06:09


© Copyright Gerger 2017