// This merges otherBindings from the parent with other
// bindings bound to this component giving preference to the
// parent's bindings (allow parent to override child).
// Is this *always* what we want, or do we need to allow
// developers to decide how to merge things?
AWStringDictionary otherBindingsValues = (AWStringDictionary)
((_otherBindingsBinding == null) ?
valueForBinding(AWBindingNames.otherBindings) :
valueForBinding(_otherBindingsBinding));
AWBindingDictionary bindingDictionary = _componentReference.otherBindings();
if (bindingDictionary != null) {
if (otherBindingsValues == null) {
otherBindingsValues = _page.otherBindingsValuesScratch();
}
for (int index = (bindingDictionary.size() - 1); index >= 0;index--) {
AWEncodedString currentBindingName = bindingDictionary.nameAt(index);
AWBinding currentBinding = bindingDictionary.elementAt(index);
AWEncodedString currentBindingValue = encodedStringValueForBinding(currentBinding);
if (currentBindingValue != null) {
otherBindingsValues.putIfIdenticalKeyAbsent(currentBindingName, currentBindingValue);
}
}
}
return otherBindingsValues;
}