I'm currently changing the structure of one of my primefaces 6.1 based project's core subviews for a Proof of Concept and found lots of references like X:Y:Z:A, X:Y:Z:B, etc... that were obviously failing after moving the referenced components elsewhere in the tree so my solution was to replace the "long id path" by p:component('A') and so on. After several replacements some questions came to my mind: "Why didn't they just use p:component()?", "Were them intentionally referred this way...if so why?". And finally the most important - THIS. Is there any difference between calling a component with its ID and its ancestors like X:Y:Z:A and using p:component('A')??
Considering also the following scenario... what would p:component('x') return? Would there be any collision or ambiguity exception?
<f:view>
<h:outputText id="x" />
<h:form id="form1">
<h:outputText id="x" />
</h:form>
</f:view>
Thanks in advance