Figured it out finally. Not sure if another setting in my Power Table is causing an issue when used in a Template repeater, but this worked for me. In case anyone else has the same issue:
Doesn't work on a power table in a template repeater
#configureEditor
target = system.tag.read('[Client]Config/select_agitation').value
ds = system.dataset.toPyDataSet(target)
options = [(row["idSelect"], row["select_text"]) for row in ds]
if colName == "Type":
return {"options":options}
Works on a power table in a template repeater
root = self
from javax.swing import JComboBox, DefaultCellEditor, DefaultComboBoxModel
class CustomCellEditor(DefaultCellEditor):
def getTableCellEditorComponent(self, table, value, isSelected, row, column):
comp = DefaultCellEditor.getTableCellEditorComponent(self, table, value, isSelected, row, column)
data = []
# get the available options for agitation type column from client tag.
target = system.tag.read('[Client]Config/select_agitation').value
pyData = system.dataset.toPyDataSet(target)
for row in pyData:
# append second column (select_text)
data.append(row[1])
comp.setModel(DefaultComboBoxModel(data))
return comp
return {'editor': CustomCellEditor(JComboBox())}