Hello everyone,

I followed the example on the FS Demo Page called "Dependent ComboBoxes" which works when the user clicks on the combobox and changes the value (let's say it's a manual process) automatically the dependent combobox is filled by executing the query from a datasource within the database procedure.

What I want to do is the following, I have a combobox called "cbo_a", (that always starts with a blank value) which on the valueChanged event calls for an action that should fill another combobox called "cbo_b" with a list of values. I select the value for the combobox "cbo_a" through a datasource and when I do that, the combobox "cbo_b" doesn't have any values, unless I manually change the value for cbo_a.

Is this how it is supposed to work? if that's the case is there any work around I can use to achieve what I want to.

Thankful in advance, Freddy

asked 05 May '14, 17:08

Freddy%20Shimabukuro's gravatar image

Freddy Shima...
277
accept rate: 0%


Hi Freddy,

Please correct me if I am wrong but what I understood is that you are changing the value of cbo_a programatically right? (by updating the value in the datasource that cbo_a is bound to.) If this is the case indeed, then your valueChange event will not fire. This is not a bug, it is the expected behavior. With a few exceptions, Formspider events are user-events (client-side events). They do not fire when the PL/SQL code updates the UI.

The reason behind this behavior is to make Formspider easy to debug and maintain. Otherwise a simple update to a datasource could cause several events to fire, code would branch out to different places. Now, when a developer opens the PL/SQL code that an action is calling, he knows that this is the code that's being executed and there is no funny business happening anywhere else.

Please see my answer on this thread for more information on this topic.

So if you call a PL/SQL API that changes the value of cbo_a then you should call the same procedure you called in cbo_a's valueChanged event in the next line of your code.

link

answered 06 May '14, 02:51

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

Hello Yalim,

Thanks for you quick reply. It's a very useful answer.

Freddy

link

answered 06 May '14, 10:25

Freddy%20Shimabukuro's gravatar image

Freddy Shima...
277
accept rate: 0%

You are welcome Freddy. :-)

(06 May '14, 10:37) Yalim ♦♦
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:

×61
×30
×11
×3

Asked: 05 May '14, 17:08

Seen: 1,235 times

Last updated: 06 May '14, 10:37


© Copyright Gerger 2017