When to refresh the binding on a table edited by multiple-clients?

Check my post edit, it's been updated to use session messages (instead of targeting each pageID individually).

Just somewhere in a script module (for the example I put it under shared.util).

Yup, component message handlers are able to use the Session listen scope.

Thank you, Ben. I have that working now.
I like the id check so that we can discriminate between the originator and the other targets.

When I have this tidied-up I will post it as a complete configuration answer.

3 Likes

Were you able to get this working?

I'm looking to do something similar in my project. Where did you end up putting the broadcastPerspectiveMessage code? I was going to put it in my Project Library but realized system.perspective isn't available in the project library.

Functions in project libraries use the scope in which they are called, so if you call a function from a perspective scope, then system.perspective.* functions will be available. In fact if you read through @bmusson's posts you will see that he does have this function in a Project Library shared.util

However, if for some reason, you don't have access to the system.perspective.sendMessage() function, then messages sent with the proper scope and parameters with system.util.sendMessage() will also be "heard" from perspective. It's a little more involved to use, but can be made to work.

Oh, that makes sense. Thanks!