Panel extension: Doc/Examples for table.addElement?

The panel extension in combination with the custom meta example gives me the functionality I need. Unfortunately the documentation/examples for the custom panel extension is rare/non-existing. At the moment I’m stucked with the correct implementation of the addElement function of the entryFactory.table(). Even the source code is bit to cryptic to get it.
I also wonder, what to put in the “labels” and “modelProperties”, as they should be arrays, but why?

This is the scenario I want to achieve:
I implement the custom panel extension and add a tableField. When the user wants to add a new entry, he clicks on the add button, than there is a dialog to select something, and then I want to give the result to the addElement function of the table field. Therefor I need a callback functionality somehow.

Is it possible to wait for a user input with the tableField.addElement function?