I was very happy, when have noticed that Oracle have fixed null value bug in LOV component, I have described couple of weeks ago. This bug is fixed in newest JDeveloper 11g release - JDeveloper 11g Update 1. At first, this bug looks quite funny, however it was affecting lots of functionality related to LOV components. One of such examples is Cascading LOV functionality, previously it simply wasn't working, since it was impossible to assign null value to child LOV, if parent LOV value was changed. Now it works fine.
I have developed and posting sample application for Cascading LOV's, you can download - CascadingLOV.zip. Cascading LOV's in 11 are simple, you just need to define View Criteria on dependent LOV component and specify Bind variable. Usage for Bind variable should be specified as Required:
While you will define Bind variable, don't forget to set Display Hint for this variable to Hide. This will allow to hide Bind variable in LOV component and not to render it on UI:
Finally, when you will define LOV for View object attribute, in View Accessor select defined View Criteria and specify value for Bind variable, this will ensure cascading relationship:
In ViewController, don't forget to set AutoSubmit = true for parent LOV's and PartialTriggers for dependent LOV's, you can set EL expression for Disabled property. You will need to create Value Change Listener methods for parent LOV's as well. Those methods will clear values in dependent LOV components:
On runtime, it works pretty nice, here is an example parent LOV and two cascading LOV components. Third LOV is dependent on second and first:
When value in first LOV is selected, second LOV becomes enabled:
Value in second LOV is selected, third LOV becomes enabled:
Finally, value in third LOV is selected:
If parent LOV value is cleared, all dependent LOV's are cleared also, it wasn't working before:
Titulo: Listas de Valores en cascada en ADF 11.
Resumen: Este capitulo muestra como construir listas de valores dependientes una de otra como el clásico (PAIS - DEPARTAMENTO). Andrejus destaca la solución de un bug que tenia esta funcionalidad pero que ha sido solucionada en la versión reciente de la herramienta.