Property with a list of properties?

I have a datatype Person, that I’m showing in a form. A couple of the properties of this Person is a list of properties. For example, I have a set of languages, and a person object can then check the languages he can speak.

In the database, this is done with a table for the persons, a table for the languages, and a table with the list of languages a person speaks.

I’m showing this Person object in three different ways. The first and second is a table and a short overview form. In both of these, it would be bad to actually show the language list as a real list, so if I’ll show them there at all, it would be in a single joined string (f.e. “English, Spanish and French”).

For these two views, I’m using an IndexedContainer object. This works quite well.

But the third is the details form, and there I have to show all of them. I need to represent them read only to most people, and writable to the person himself.

To complicate matters a bit, I also have a field with how well a person speaks a language (1 - 5).

Showing this in the UI is not that difficult. For example, I could do something like this:



English: 1
Spanish: 2
Add new language:

How can I implement this? Any idea on how I can add the data without ditching the IndexedContainer (I like this class).


Bo Thorsen,
Monty Program AB.