0
Answered
Update a binder list row-by-row
I have a binder that contains a list of items. I have a 'populate' button that is designed to fill out information in the binder, or simply update the information. Currently it works something like this:
@on('populate', 'click')
def populate(self):
for Info in self.collection:
info.refresh()
self.binder.update().populate()
""" Ideally the list populates in the browser here,
and then the code continues
"""
Where indicated in the code, I'd like the browser to update. Is this possible?
@on('populate', 'click')
def populate(self):
for Info in self.collection:
info.refresh()
self.binder.update().populate()
""" Ideally the list populates in the browser here,
and then the code continues
"""
Where indicated in the code, I'd like the browser to update. Is this possible?
Customer support service by UserEcho
Browser side UI is automatically updated when there are any changes on the server-side. The reason why you don't see the updates is because you have overwritten your object data with empty values from UI when you called update() for the first time.
self.binder.update().populate()
vvv
self.binder.populate()
I tried this, restarted Ajenti, and the list still doesn't populate until the for loop is completed.
Ajenti is awesome, BTW!