views:

50

answers:

0

I'm working on a flex UI that has to create an inclusion list from dynamic data. Rather than belabor things with an analogy, here's a quick sample of what my inputs are and what my expected outputs are.

First, the data grid will be populated with something like this:

{id="1", v1="Value1.1", v2="Value1.2"},
{id="2", v1="Value2.1", v2="Value2.2"},
{id="3", v1="Value3.1", v2="Value3.2"},
{id="4", v1="Value4.1", v2="Value4.2"}

I'm creating an XML document from these that will include only selected values from that list:

<list>
    <item id="ID1" v1="Value1.1" v2="Value1.2" />
    <item id="ID4" v1="Value4.1" v2="Value4.2" />
</list>

The UI that was discussed is a data grid that displays all of the values that are available, with a checkbox to include each one.

ID | v1       | v2       | Included
1  | Value1.1 | Value1.2 | <CHECKED>
2  | Value2.1 | Value2.2 | <NOT CHECKED>
3  | Value3.1 | Value3.2 | <NOT CHECKED>
4  | Value4.1 | Value4.2 | <CHECKED>

So, what's a good model object to represent this?