Link Objects Together
We are creating a form in which we have many labels, textfields, lists, comboboxes, and etc..
Our objective is that when the user clicks on a label it should navigate them to a screen where they can further configure the label and its associated textfield. For example, suppose we have a label captioned 'First Name' and a text field that follows it for user input and in addition another label with a asterik(*) symbol marking it a required field. When I click the label and am navigated to the configuration screen how can I have the system at runtime identify which other objects are associate with that label firstname? I want to only show the properties for the associated object.
I had thought about creating a db table establishing relationships with all objects but then I would have to manually update that table if I delete a object or change the object type.
Thanks in advance for your help.
Put them in a HashMap and use the same key values for objects that belong together?
Use different containers for each set of objects and simply ask for the container's components in the further setup screen?