protected GetterGraph constructContextualGetter(Bean bean) {
return addToContextualGetter(new GetterGraph(), bean);
}
private GetterGraph addToContextualGetter(GetterGraph contextualGetter, Bean bean) {
Bean theBean = bean;
while(theBean != null) {
Bean parentBean = theBean.getWiredInto();
if(parentBean != null) {
if(parentBean.isCollection()){
// Contextual selectors stop once they hit a parent Collection theBean...
Bean wiredInto = parentBean.getWiredInto();
if(wiredInto != null) {
// Use the collection item's beanId as the context object name
// because collection items don't have property names...
contextualGetter.setContextObjectName(theBean.getBeanId());
}