Hi everyone,
I write a little piece of code to make easier refreshing multiple tables, but still do not get it work,
is there a way to refresh multiple components?
this is the code i write but i get the error :
TypeError: refresh(): 1st arg can’t be coerced to javax.swing.JComponent
CODE
List = [ “Power Table”,“Power Table 1”]
ListName = [“Component”]*len(List)
for i in range(len(List)):
ListName[i] = “event.source.parent.getComponent(’”+str(List[i])+"’)"
system.db.refresh(str(ListName[i]), “data”)
i don’t think you can use a list for this. If you only have two tables, you could just run two separate refreshes. If you have many, you could create a loop.