sclass HTMLForm { new L rows; S tableClass; asclass Row { S label; // HTML abstract O contents(); // HTML } srecord LiteralRow(S contents) extends Row { O contents() { ret contents; } } S html() { LLS matrix = map(rows, row -> ll(row.label, strOrEmpty(row.contents()))); ret htableRaw_valignTop(matrix, empty(tableClass) ? litparams(border := 1, cellpadding := 4) : litparams(class := tableClass)); } void add(S label, O contents) { rows.add(new LiteralRow(label, contents)); } }