How do I add a simple plain table with data to existing screen?
The data is already parsed text from DOM. Can I do it with TableModel? Here’s what I have now:
TableModel tm = new TableModel();
tm.addRow(doc.getElementsByTagName("id").item(0).getChildNodes().item(0).getNodeValue());
tm.addRow(doc.getElementsByTagName("id").item(1).getChildNodes().item(0).getNodeValue());
final MyScreen screen = new MyScreen();
Can I use something like:
screen.add(...)
Or it should I use something other than the TableModel container?
TableModelis merely a data model. To display the data, you’ll need to use aFieldthat uses the data contained in theTableModel. I’d suggest making a custom field that accepts thisTableModelobject. You could also use aGridFieldManagerand addLabelFields to it for each cell of theTableModelobject.