i trying develop simple aplication using MVC Architecture using extjs 4.2, my problem is, if i call controller firt time it running but if i call same controller again i got the error "Uncaught TypeError: Cannot read property 'buffered' of undefined"

please tell me the true way using store, grid on controller and this is my code

i call dinamic controller from this code (please look at btnClicked:function(btn, e, eOpts))

Exactly I got the same error. I have a grid placed in a Window, when I click the button to open it works well, but If I close and retry to open it a second time doesn't work. The console log show this sibylline message:
Uncaught TypeError: Cannot read property 'buffered' of undefined

Any ideas?

22 Apr 2013, 11:49 AM

slemmon

@4lenour,
I'm afraid I'm not following where you're having trouble. What is happening on the first button click that is not happening on the second?

@rh_it,
What is the closeAction config set to on your window containing the grid?

22 Apr 2013, 11:54 PM

rh_it

Hello, I set the

Window closeAction as destroy

FieldContainer (has no property like destroy)

Grid closeAction as destroy.

I tried to set all of them as hide but something broke up the layout. To call the Window I defined controller action on my Button as

Code:

Ext.create('MyPrj.view.MyWindow').show();

23 Apr 2013, 10:52 PM

slemmon

closeAction on the window would need to be 'hide' if you want the window's child items not to be destroyed when the window is closed.

24 Apr 2013, 11:26 PM

4lenour

i have the answer about this case, i am try to set false in autoDestroy or remove autoDestroy, and success!