Thought a short code example might help:
<p:dataTable rowIndexVar="rowIndexVar">
<p:column>
<p:commandLink id="myTrigger">
<f:param name="rowIndexVar" value="#{rowIndexVar}" />
</p:commandLink>
</p:column>
</p:dataTable>
<p:menu trigger="myDatatable:#{rowIndexVar}:myTrigger" />
or similar (trigger value with or without a leading colon), doesn't work (errors out), even if I pass the variable rowIndexVar on rowSelect. I think this didn't cause page error:
<p:menu for="myDatatable:myTrigger" />
but it also didn't do anything on command-component-based rowSelect.
The actual Id of the command component resolves to
id="myForm:myDatatable:{n}:myTrigger"
where {n} is the rowIndexVar. Trying to reference that complete component path also doesn't work, with or without a leading colon.
Hope this isn't more confusing than helpful to anyone with a possible answer.