do you have any idea to add an editable table to NodeDialog? My current requirements are
<1> To show a table In NodeDialog, which is created dynamically due to different previous input.
<2> To make the table editable, or more clear, specific columns editable
<3> The cell value can listen to other cell changes.
I have noticed the Node Table Creator that can accept the standard input(I mean with keyboard). It uses the SpreadsheetTable to store the data. Here, I wonder if there are another simple alternative??
Maybe in a simpler way to ask.
How to create a DataTable in NodeDialog? As mentioned in https://www.knime.com/execute-0 , there are two ways to create a BufferedDataTable,
- with a
BufferedDataContainer (Example#2), or
- using the
I think, it’s ok to limit the creation of DataTable. One problem with it are we need to use ExecutionContext exec to create them. However, there is no ExecutionContext exec in NodeDialog. So, are there other ways to create DataTable without ExecutionContext exec??
I think your best option is to copy the functionality from the Table Creator node. BufferedDataTable
The creation of BufferedDataTables is bound to the execution context, as it manages the data being passed around in the workflow. Because BufferedDataTables can be flushed to disk to free memory or to persist them on workflow save, they need to be bound to the context.
You can create the BufferedDataTable in your node during execution based on the SpreadsheetTable.
Thanks, @gab1one .
But what my situation differs from the TableCreator is:
<1> The table should be created before it enters
NodeModel#execute(final PortObject inData, final ExecutionContext exec)
<2> The table is in NodeDialog which is filled with data from inputData. I managed to get the data from
DataAwareNodeDialogPane#loadSettingsFrom(final NodeSettingsRO settings, final PortObject input).
<3> The table can be editable in configuration process and then passed back in the
So I don’t see one way to use ExecutionContext exec to create a table in NodeDialog.
Indeed, this is not intended to be done, NodeDialogs are supposed to create a lightweight configuration file which is then executed by the node. What you are trying to do is definitely not possible by creating a KNIME table in the dialog.
If you take a look at the Table Editor Node, that one allows you to edit a KNIME data table, the mechanisms involved to make that possible are quite involved though.