for the children of a re-usable component, values for data binding point to the “inheritedDataModel”, which is great (see screenshot below). We can very easily connect the value for a child in the reusable component to a repeater when the reusable component is placed inside of a repeater.
HOWEVER, if we want to write some logic for the value of the children in the reusable component, we cannot really do that… because only Page Data and App Data are available:
OK, when I do that (check “data container” for the reusable component), I see the option to build logic with the data model from the reusable component. So I have the option of App Data, Page Data, and “reusable component data”. How do I access a data model from some other component on the page?
Right. That’s why it would be nice to include “inheritedDataModel” as an option in the logic areas for reusable components… because it is already set for the data binding of values, seems like it would be easy to have it be an explicit option in the logic building areas…
Update: the way to get a reusable component to take in a data model from the “outside” is to
a) check “data container” for the top level of the reusable component, and then
b) in the parent container (i.e. the place which contains the reusable component, AKA the outside world), we can go into the logic area of the reusable component and wire up “Data Model Logic” to inject a data model that we want to use inside the reusable component. For example: