I'm actually surprised I haven't found a function that does this yet. What I'm looking for is the equivalent of the component.up() function but for a store. Since store does not inherit from Ext.Component it doesn't have the up() function. However I want to refer to a store's parent inside a load event handler for example. I have found ways to do this like using Ext.getCmp
or creating the handler from the parent via: parent.getStore().on("load",handler)
etc but I'm specifically looking for a way to reference to the parent from the store object directly. For future reference mainly.
TL;DR: What is the equivalent of Component.up()
function for a Store. Store.up()
doesn't work.
From what I have gathered what I am looking for is not possible. Since there are workarounds this is not a problem.
Stores do not have parent-child relationships, thus there are no methods for finding their parent etc. Either use Ext.getCmp if needed to access the parent object or work on the store directly through the parent so that you have scope of it.
EDIT:
If the goal is to execute some logic after the store triggers an event, then we can use the relayEvents
features to handle the store's events from the parent object, thus having access to it.