Table design ideas?

A question to those of you with more experience:

Is there any way to create a table with more than one type of rows?

Tables for reports are generally contructed by using SQLContainers to get the database data, then re-assembling into an IndexedContainer if needed for combining data. That works fine for tables having one type of row.

Now I have the case of an aircraft logbook. Normally rows represent flights, and contain properties (columns) pertaining to flight data. Every so often an aircraft defect is found. That requires a very different type of row, but inserted in the same table, followed by more flight rows - in chronological order.

So what might be done to insert two different row types in a table? I suppose I could construct rows manually, then stack them using the mother of all vertical layouts. But that seems pretty crude. Is there an elegant approach to this problem?

You might be able to do this using GeneratedColumns (see the Book of Vaadin or just Google for tutorials on how to use it).
This way you can return different components depending on what kind of row you want to display.

Hey Steve,

Would you care to elaborate on what different type of rows means in this context? Aesthetics? Content? Both?

Thanks for the interest.

An ideal table might look something like the attachment. Items would be drawn from a container until a qualifying item from another container is found, then that item would be placed in the table. Or maybe one container contains two types of items? The structure of the table’s rows would be different and independently configurable (width, centering etc.) In my use case, there would be no need for a second header or footer, but those might be useful, as would independent control of column widths. In effect, two tables interleaved.

Does that make sense?
17524.png

I have same kind problem. I just notice that there is possible use GridLayout https://vaadin.com/forum#!/thread/8533289 if anything else (example: table + table or treetable + table combinations) does not work. Of course that need much more work, example sort and other table actions must build “manually”.

Attached is a page from an aircraft logbook. You can see that most rows in the table are used according to the table headings. But when somehting different happens (maintenance in this case) the person entering data uses the rows in any way he wants. Aviation being a highly regulated industry, there is little flexibility about big format changes. The regulator wants a record, in chronological order of the things that happened to the aircraft. If this table were to be done electronically, that table would need to have the same characteristics that rows of different types be assembled to make one chronological record.
17546.jpg

Steve,

I’d probably go about this in a different manner. How about showing a warning/error/notification icon for those rows that contain aircraft defects?

Perhaps a more detailed view/popup/information panel is shown when clicking that icon? Or you could try a master-detail approach?