Refreshing a custom property of a dataset

I have a table, table1, with a custom property of a, named dataset, which is a dataset. On a script I need to refresh this data before it runs. Or when I press a button:

the script:

system.db.refresh(event.source.parent.getComponent('table1').dataset)

errors with: Traceback (most recent call last):
File "event:actionPerformed", line 1, in
TypeError: refresh(): expected 2 args; got 1

system.db.refresh(event.source.parent.getComponent('table1').dataset, "data")

errors with:
File "event:actionPerformed", line 1, in
TypeError: refresh(): 1st arg can't be coerced to javax.swing.JComponent

Can we refresh the data in a dataset which is a custom property?

The correct syntax should be:
system.db.refresh(event.source.parent.getComponent("table1"), "dataset")
The first argument is a reference to the component (table1), and the second argument is the name of the property to refresh.

1 Like