In the subjected component, inside a template, if i put in the "Root node path” property a fixed value, it works perfectly.
If i bind the “Root node path” to a custom property (or a template parameter - the same) the behaviour is “random”: some times when the template is invoked it works, some times not (show all the connections instead of the bound one).
It seems a sort of “delay” in binding evaluation: like the component being instanced and then the binding is coming. Not being in a template any “opening” event, I do not have any idea how to manage the delay (if that is the issue).
How can I sort out?
I have this issue as well on templated bindings with passed parameters. I notice it only because I get gateway log errors that the historian path doesn’t exist. It mostly seems to do it on sparklines for me. However, the bindings do resolve after a short delay.
I’ve tried fixed datasets coalesced with the actual dataset but still have the issue. It hasn’t been a high priority to solve, but would be nice to have a solution.
Yes, it seems being the same. I worked around with a “static” value, indeed not what I wish/need to do. I need to have a dynamic expression resolving the Root tag path, as foreseen being bindable. It can be either in the template calling window (via parameter, so before the template is involed) or in a custom property inside the template itself.
Any suggestion/solution? Thx
Consider using a static value to start up with, that will reliably yield an empty tree. Then, use a template internal property with the actual binding desired. Use a propertyChange event to write from the bound property, when it is valid, to the tree's root path prop.
Thx Phil. Understood the logic/approach.
What do u mean with “when it is valid”? Practically, how to test the binding validity inside the property change eventi?
Probably just check for the leading open bracket that starts the tag provider name. Empty or null would be invalid and not passed on.
Very clever! It works perfectly now. So useful as logic/approach also for other stuff.
Many thanks