|
Re: how attach list item values based on another list item [message #308008 is a reply to message #307951] |
Thu, 20 March 2008 14:55   |
solisdeveloper
Messages: 48 Registered: March 2008 Location: Mexico
|
Member |
|
|
You could try this:
Create a procedure that receives the country-ID, and acording to it you populate the cities List-Item using the Add_List_Element Built-In, in this case using the data obtained from a query.
Then in the When-List-Change Trigger of the List Item containing all the countries, call that procedure sengind it the country-ID as parameter:
This is what your procedure could look like:
PR_populate_cities (p_country_id cities.country%TYPE) IS
Cursor c_cities IS
Select city_id, city_name
From cities Where country = p_country_id;
Begin
FOR c in c_cities LOOP
Add_List_Element(:blk_block.it_cities, 1, c.city_name, c.city_id);
END LOOP;
END;
And this is what the code on your When-List-Change Trigger could look like:
pr_populate_cities (:blk_block.it_countries;);
Hope this helps
Regards!
|
|
|
|
|