First of all, do not use the byId(...)
method on the Core
, it's bad practice and not a good habit to get into.
For your interest, the reason your first line of code does find the relevant UI control, but the second line does not, is because the Core
is shared across all applications in the Fiori Launchpad. This means that all Control IDs are prefixed with the application namespace, and because your second line of code does not contain the application namespace it therefore does not find the Control.
As for how to correctly get the List data from that Control from elsewhere, simply get the bound data from the same model path you're binding that Control to. For example, if the Master list is bound to {/Products}
then you get the same data by this.getView().getModel().getProperty("/Products")
. This assumes that your data model is shared across the application however. I would recommend that you read the UI5 documentation and understand more about MVC architecture, because the UI Controls should just surface the data which is stored in the underlying Model(s) and that is where the data should be.