I have this scenario, when i execute the getLoadedTemplates on template repeater, i have empty array for every result.
how can i detect if the template repeater is ready so that i can execute the getLoadedTemplates?
if event.propertyName == “templateParams”: #print len(event.newValue)
pydata = system.dataset.toPyDataSet(event.newValue)
for row in pydata:
print row
templateList = onShit()#event.source.getLoadedTemplates()
print templateList
#templateList = tempData.getLoadedTemplates()
#print len(templateList)
for index,template in enumerate(templateList):
#find a component named "Label" in the instance,
#and print the value of the text property
template.getComponent('CheckBox').text = str(pydata[index][0])[/code]
if event.propertyName == “templateParams”: #print len(event.newValue)
pydata = system.dataset.toPyDataSet(event.newValue)
for row in pydata:
print row
def func():
templateList = onShit()#event.source.getLoadedTemplates()
print templateList #templateList = tempData.getLoadedTemplates() #print len(templateList)
for index,template in enumerate(templateList): #find a component named “Label” in the instance, #and print the value of the text property
template.getComponent(‘CheckBox’).text = str(pydata[index][0])
system.util.invokeLater(func)[/code]Best,
This does not work for me… unless I’m doing something different than you.
My issue is inverse. I start of with 10 records, and then set templateParams to an empty dataset, which comes over as templateParams count of zero, but blah() func still shows a count of 10.