The example project aims to address some issues I have encountered when working with the repeater:
- manually setting templateParams,
- refreshing loaded templates when the templateParams data changes but the dataset’s count does not,
- accessing loaded templates at the correct time with getLoadedTemplates().
TemplateRepeaterExample_2017-11-28_0833_partial.proj (19.4 KB)
/chris
1 Like
I have problems with manually setting templateParams as well.
this is what i do in my script on my template:
window = system.gui.getWindow('Popups/Add')
dtset = window.getRootContainer().getComponent("Template Repeater").templateParams
pyData = system.dataset.toPyDataSet(dtset)
---> here i do some things with my pyData
window.getRootContainer().getComponent("Template Repeater").templateParams = newdtset
i have this in a try except, but this row gives me an error:
window.getRootContainer().getComponent("Template Repeater").templateParams = newdtset
by the way: its working how it should be, except i get error messages everytime i a field on the template repeater when this row is called
it is working now, i made an extra custom propertie on my rootcontainer. i bind the sql query to that propery and set the template repeater binding to that propertie instead of the sql binding. a little bit weird but at least it works