Rob Nagler wrote: > Layout managers accept a declaration ('this cell is northwest', 'this > other one expands across the bottom', etc.). They interpret the decl > at run-time. It's like HTML, but more declarative. Some attributes > of our Grid manager are: > > cell_nowrap - don't wrap the text in the cell > cell_align - gens valign and align from a single compass direction > cell_expand - this cell eats up the rest of the columns in the row > row_control - a conditional value to control whether row is displayed > cell_width - contains the HTML width= value (may be dynamic)
Can't all of that be expressed in an HTML template? It seems like the template should know enough about what kind of data it's displaying to know how to arrange the tables. After all, it's not a template for a generic table; it's a template for a table that displays specific data with a structure that is pre-determined. Usually when I see people doing this kind of thing it's because they haven't expressed all the necessary information in their model. For example, if you have a rule that says people's names don't get wrapped, then you need to know which pieces of data are names. If that isn't obvious from your data structure (i.e. person.name is always a name) then you add some flag to your data structure like is_name, so that the model can tell the view that this is a name. Then the view gets to decide what special treatment to give that data. Maybe there's a certain class of problems where the sort of layout hints you're talking about are needed and I've just never had to deal with it. - Perrin