Juergen Donnerstag wrote: > Question please. "DataTable"s can have one or more columns. According > to the constructor each IColumn must have the same model object type. > What is the logic behind that? I would assume that each column can > have a different model object type. > > public DataTable(String id, IColumn<T>[] columns, IDataProvider<T> > dataProvider, int rowsPerPage)
I'm afraid your assumption is incorrect. Each IColumn<T> represents a way of rendering a facet of an object of type T. The DataTable obtains a collection of objects of type T from the IDataProvider<T>, and passes them *one* *per* *row* to the IColumn<T> implementations to populate the cells. The T in IColumn<T> is the type of the model objects that are being iterated over row by row, and *not* anything to do with the facet of that object that is displayed in the column in question. Max.
signature.asc
Description: OpenPGP digital signature
