Code example
To display a list of addresses, you can use UlcTable with UlcTableModel. UlcTableModel uses the same mechanism as UlcFormModel to access attributes from the domain models, as follows:
|tableModel box|
(tableModel := UlcTableModel new) model: someModel.
(box := UlcBox new)
add: (UlcTable new
tableModel: tableModel;
add: (UlcColumn new
attributeName: 'street'; yourself);
add: (UlcColumn new
attributeName: 'zipCode'; yourself);
yourself).
UlcShell new add: box
UlcColumn is an integral part of UlcTable. UlcColumn uses the table's model and takes data from UlcTableModel using the attributeName property as key. Columns are children of a table. They can be added (using #add:) to a UlcTable instance.
The Table and Column parts support sorting with a button over each column that allows sorting by that attribute.
You can navigate and edit the table using the keyboard.