PDA

View Full Version : Store record life across JS files



14 Jun 2015, 8:49 PM
Hi,
I have a view file in which i have created a window with textareafield. Now, i want to to put a handler(and make ajax call) on Enter Key. But, I want to declare the call inside the controller.

How can i access the records of the store from the controller ?
I am using Keypress handler.
Thanx in advance for help!

tristan.lee
15 Jun 2015, 1:26 PM
You can get reference to a store by name via the getStore() (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.app.Controller-method-getStore) method within your controller.

If this isn't what you're looking for, please provide a code sample so I can work with you.

15 Jun 2015, 9:24 PM
Thanx tristan for your help...the issued got solved!

I needed a view reference too...so i used a ref config to get that inside the controller...and used .getStore() as suggested by you.....

Thanx again

tristan.lee
16 Jun 2015, 9:39 AM
Great, glad you got it resolved.