I understand Mike :-)

So if I have a collection of parent objects, which in turn each parent object has a collection of other child objects, then I can show a table where the first column is fixed and contains vertically the list of the parent objects, but for each row, the columns are dynamic and can show the collection of child objects for each parent. Is that right?

What should I use for each data model, I mean, the collection of parent objects to populate the main data table and the child collection of each parent object to populate the columns component? Would that make sense? If I edit all the child objects, would the getRowData from the main table return me a parent object with its colllection modified so I could rapidly persist it?

Thanks for your support ;-)

2005/11/7, Mike Kienenberger <[EMAIL PROTECTED]>:
t:columns does exactly that -- it takes a collection of data and makes
as many columns as items in the collection.

In fact, you can think of t:columns as a data table rotated 90 degrees.
The t:columns component, like dataTable is a subclass of UIData.   The
"trick" is that when t:columns renders a "row" it uses <td> instead of
<tr>.   It's not quite that simple, but from the perspective of an
end-user, it can be treated as such.

In fact, t:columns API is a little bit confusing since getRowData()
really means getColumnData and getRowIndex() really means
getColumnIndex().   Again, that's because it's effectively a nested
dataTable that renders td tags instead of tr tags.

I hope that helps!

On 11/7/05, Enrique Medina <[EMAIL PROTECTED]> wrote:
> Well, maybe I have explained myself badly, but obviously the number of rows,
> although dynamic, would be fixed (i.e. the maximum of all).
>
>  The main problem I have is that the data for the columns is a collection
> rather than a fixed number of properties in a class; i.e . it represents an
> object with a collection of objects inside it, and each element of the
> collection is the data I want to show for every column.
>
> 2005/11/7, Mike Kienenberger < [EMAIL PROTECTED]>:
> > I don't know of a component that generates a different number of
> > columns for each row.   Columns allows a dynamic number of columns,
> > but the number is still the same for every row.
> >
> > What kind of html would you expect it to generate, since a standard
> > html table expects a set number of columns?
> >
> > Probably, your best bet is to go with a t:dataList which operates on
> > row data, but doesn't render any particular output.   Then, for each
> > row, you can output whatever kind of html that you need.
> >
> > On 11/7/05, Enrique Medina < [EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > >  I want to create a special data table where the number of columns is
> > > variable in each row depending of the value of the object being painted.
> > >
> > >  I've been looking at the HtmlColumns component, but although being
> dynamic,
> > > I can't see how I can define different number of columns for each row.
> > >
> > >  Any idea of how to accomplish this kind of data sheet?
> > >
> >
>
>

Reply via email to