Hi,
I am trying to link a property which is present in my header view, to one of my components in another view. Is this possible to do? When I try and browse the available properties, I am only seeing properties pertaining to all components that are within my current view, and not the header view.
Hi,
So how can I get the path of the property to bind to my session prop? For example, if I want to create a custom session prop called "label_value", what would the path be if I am trying to bind the value located in "./Header.header.root.label.value"?
Views/Components only have insight into the properties of the following areas:
Components within the same View (NOT child views)
Session
Page
If you need access to a property in a different view, then by definition that property should be scoped differently.
While examining the Session Properties in the Designer, scroll down to the Custom area at the bottom and add your new property: label_value. Don't forget to add a default value. I also recommend a more concise name as this label apparently means something very specific to the session and you won't want to have questions about it later.
When binding, you'll bind against this.session.custom.label_value.
And you don't bind the session prop to the view's label. You bind from the label to the session prop, bidirectionally, if necessary. Do this in both views.
Did you make the binding bidirectional?
If you don't then the label just displays the session property.
If you do then setting the label will update the session property.