The RepeatingPanel repopulates itself each time its items
property is set. So if you set it again (even to the same value!), it will rebuild its contents. (Calling self.refresh_data_bindings()
only refreshes the data bindings defined on this form; it doesn’t do anything global. Read this post about data bindings for more info.)
If you’re triggering this from inside the RepeatingPanel (eg in a row of your table), you’ll need cooperation from the form that contains the RepeatingPanel. A good way to do this is to raise an event on the RepeatingPanel (which is self.parent
if self
is a form in the RepeatingPanel), then catch it in the containing form. So, in the template form, you do:
self.parent.raise_event('x-refresh-list')
…and in the form that contains the RepeatingPanel, you do:
def __init__(self, **properties):
self.init_components(**properties)
self.repeating_panel_1.set_event_handler('x-refresh-list', self.reload)
def reload(self, **event_args):
self.repeating_panel_1.items = # ..whatever...