Apply dynamic class based on $currentObject association but not available.

0
Entity A *-1 Entity B Entity B has a string value called 'label' and a Boolean value called 'isDisabled'. A Reference Selector is used to dynamically create the values in the drop-down; the Reference Selector is placed in a Dataview and the Data Source of the Data View is set with Entity A. The Data Source of the ReferenceSelector's Data Source is set to the Label of the String Value of Entity B, which is connected to Entity A by an Association. By doing this, the values of the labels in the list of Entity B's associated with Entity A can be displayed in the Reference Selector. I want to assign a Dynamic Class based on the Boolean value of 'isDisabled' stored in that list, but the $currentObject cannot be linked by an Association. Like, in the list of Entity B there is a list of label like [Room1, Room2, Room3, Room4, Room5] and I want to make some lables incative (not selectable but still show in the dropdown) based on the boolean value. Is there a better way to do this?
asked
1 answers
0

Thank you for your reply.

Using a custom widget created by third party is not accepted in this project and it is not static so 1st and 4th options are not ideal. I was thinking similarly with the 2nd option, but to unavailable items shown below the reference selector like Text and make the reference selector values all selectable.

What I wanted to achieve was 3rd one but I was successfully able to show the labels in the reference selector but not able to apply dynamic class based on the computed attribute 'isDiabled'. This is because in the configuration of dynamic class, the associations are not available and won't reach the Entity B...

It is weird because for the labels I can choose the values of Entity B which is associated with the Entity A but it is not the case when it comes to dynamic class of the same widget (reference selector).

If you have any idea or workarounds please let me know.

answered