I haven’t worked much mich cuba platform so far, therefore I am somewhat stuck on a simple proof of concept:
I’d like to have a form with three picklists to enter a new record for entitiy objectRelationship: Object1, object2 and objectRelationshipClassification (see attached ER Diagram)
as you can see object 1, object2 and objectRelationshipClassification all have a reference to ‘category’
Now, I’d like to create a dependency of sorts so that only objectRelationshipClassifications are listed which match the object1 and object2 categories.
Basically something like select e from everything_ObjectRelationshipClassification e where e.object1Category= object1.category and e.object2Category= object2.category
Obviously I want the list of objectRelationshipClassifications to change in realtime if object1 or object2 are changed.
I am sure there is an easy way to do this, but maybe I am looking at the wrong part of the documentation. Maybe someone can help me out?
In the controller, you have to manually set the parameters in the objectRelationshipClassificationsDl as you are not filtering for a direct attribute, but rather via the object.category association.
objectRelationshipClassificationsDl.setParameter(parameterName, event.getItem().getCategory()); sets the corresponding value in the data loader. You have to register for value change events of both fields and add the corresponding parameter to the data loader.