I usually add a List of my domainObjects to the TableView on
initialization, and then later add objects on the fly when more are
created. Because of the typing on getTableData() however, I can't do:
tableView.getTableData().add(myDomainObject). I have to cast the
getTableData() to either an untyped List or a List<MyDomainObject> and
then perform the add. This is because of the following definition of the
getTableData() method:
public List<?> getTableData() { }
What good does the <?> serve here? Sure, if TableView accepted a generic
type argument that was used instead of ?, this would be super-handy, but
now it just seems like an obstacle. I'm no generics expert, so I guess
it is a good reason for this though? :)
-- Edvin