Refresh Binding on sparkline

I have a sparkline that is using dynamic tag history binding. After an insert on the page, I want to refresh the points binding to reflect the insert. Right now, it only shows up when I navigate away and back to the page.

I am using a button to submit the tag history inserts followed by:

system.perspective.sendMessage("refresh", payload={}, scope="view")

Then, on the sparkline I have a message handler called "refresh" with

self.view.refreshBinding("props.points")

The problem that is driving me nuts is the sparkline message handler is throwing an error about scope but I have already added scope=view and Listen Scope to View. (Button and Sparkline are on the same view).

ERROR BELOW

File "<function:onMessageReceived>", line 3, in onMessageReceived
java.lang.IllegalArgumentException: No binding on property "props.points".

Any suggestions on what I'm missing? Thanks!

If the message handler on the component then it should be self.refreshBinding("props.points")
Your binding property is not on the view(root).

1 Like

when I change it to self.refreshBinding() the binding never refreshes. At least I don't get the error anymore.

I deleted the rows and when I refresh, the rows don't come back. That's how I am testing.

OK, just a follow up. Not sure why but I changed the listen scope to session and then saved, then back to view and saved and it now works. Thanks!