I have a requirement where a form contains a list of compound input fields, each consisting of a text field with a checkbox add-on:
It’s important to realize that each movement (flexion, extension, etc.) has a related opposite movement. For example, flexion is paired with extension, right lateral bending is paired with left lateral bending, and right rotation is paired with left rotation.
When ankylosis is NOT checked, all text fields are enabled. When ankylosis for a specific movement is checked, then its opposite movement must be disabled. For example, if the user clicked Ankylosis for flexion, then the entire extension input field and checkbox need to be disabled.
For this reason, each rom-field indicates its “opposite” control. Each rom-field is using an observer, so when a checkbox is checked, it gets notified, and I have access to all the details about the rom-field. However, when a checkbox is checked, I need somehow to notify the rom-group, so that it can look-up the opposite rom-field and disable it.
I cannot figure this puzzle out. Does anyone have any suggestions on how to send a message to the component’s parent without tightly coupling them?