Open croHamster opened 8 years ago
That seems to be a problem indeed. I'll see if I can find a solution for this.
This problem should be solved in my pull request
croHamster can you please take a look, that there everything works?
Sure, I can test it, but need input of how to download the pull request so I can install it on my test APEX 5 environment?
I managed to import the pull request and have tested it. There was also my mistake that I was not using the "Optimize Refresh" correctly (must be set to "No" when using null values that return entries).
The official release works fine with 2 cascading LOV's, but not with 3. The pull request version works fine both with 2 and with 3 cascading LOV's.
Thank you both. Looking forward of merging the changes into the official release.
Hi Pavel,
I did some more tests and can confirm what i wrote in my previous post - your version works even with 3 levels of cascading LOV's. But there is one behaviour in your version that work's different than in standard select and in select2 official release: when you clear (select null) in parent LOV, the child LOV's selection stays. Standard behaviour is that it is also cleared (nulled).
This can be also a feature, but I think it should eventually be possible to set it up through some option (setting).
Hi Hrvoje, Are you set "Display extra values" on child LOV's to "No"? You can see sample App on https://apex.oracle.com/pls/apex/f?p=65254:1
Sources of attached apps are f65254.zip
Yes, I have "Display Extra Values" -> No, and "Display Null Value" -> Yes.
The difference is that you show no values in the child when parent is null, and I have all child values when parent is null (this is done with the SQL statement like: select name, id from child where :parent_id is null or parent_id = :parent_id). If I remove the ":parent_id is null" part, it works like in your example an sets the child to null when parent is cleared.
+1. It is currently not possible to trigger a child to refresh when the parent was emptied through JavaScript.
Example: apex.item("P1_PARENT_LOV").setValue("");
does not trigger P1_CHILD_LOV
to refresh.
Nevermind. I forgot to set "Optimize Refresh" to "No" too. Works on my end now. The X works too.
Hi,
I found this one of the most useful APEX Plugin.
In the meanwhile I found that select2 is working with cascading LOV, but not in one situation: if you have a child LOV that shows all values when parent LOV hasn't a selection (select name, id from child where :parent_id is null or parent_id = :parent_id) and you make a parent selection, the child LOV is showing correct entries. But if you then clear the parent LOV by clicking the 'x' mark at the end of the selected element, the child isn't showing anything (should again show all entries).
Please check this issue. TIA, Hrvoje