You need to locate the first resource and then iterate over its properties... So, from component 2, you should get its parent..something like resource.getParent()... this is common parent for both your components... then do parentComponent.getChild(<first component path>). Now that you have it, you ...