I have not used my app for about 6 months, and I’m sure there have been changes. Historically I’ve had a page where you can type into a Textarea (called “setup_update_text”), and when the lost_focus event happens it triggers a server side function to update the “setup” field for an interview I’m debriefing. All of this still works fine.
What I’ve noticed now I’m starting to use the app again is that the setup_update_text panel is not reloading the content from the server, it’s retaining whatever was there before the panel lost_focus - which is not how it used to work.
I’m using this code (which was working 6 months ago):
def update_setup(self, **event_args):
anvil.server.call(
'update_setup',
self.interview,
self.setup_update_text.text,
)
#refresh the setup text panel
self.setup_update_text.text = self.interview['setup']
If I add print(self.interview[‘setup’]) then it displays the historical content, so this is no longer fetching the updated content from the database and displaying it.
What I’ve tried and what’s not working:
I attempted to use the function:
self.refresh_data_bindings()
At the end of the update_setup function, which worked, but then it also refreshes all of the other data_bindings on the page and causes them to lose their initial values, so this isn’t a workaround.
For what it’s worth I’ve got a bunch of text areas and repeating panels all on the same page, as I’m using it to listen to interviews and update different aspects of the app depending on the conversation direction in the interview.
Clone link:
share a copy of your app