Hi Guys. This is one humbling framework sometimes. Just when you think you finally understand you get one of these. MVC app, just one panel on a viewport. I'm using afterrender on the formpanel in controller to call server, which is happening fine. But my code to load server data into form can not get a reference, undefined object error like it doesn't exist.
Using console log to see what is going on, the scope is inside the DOM, after CSS rendering. panel is called "rollform", console log shows "rollform-1099" when I attempt to get ref with "panel = Ext.ComponentQuery.query('rollform')[0];" in the function called in controller with afterrender.
I've created hundreds of these type apps but all other times a grid is the initial object bound to viewport. This is first attempt with a panel. There has to be something fundamental I don't understand.
Below is code from controller. The viewport simply uses Card layout with "rollform" as it's only item. It renders, I can see panel title. But can not find correct way to get reference to form fields to load server reply. It fails trying to load first form field from server reply in success function. Says it can't read "property" setValue of null. The console log of panel variable is the DOM instance object "rollform-1010". My scope is off and I'm out of things to try.
Thanks!
Capture.PNG
Using console log to see what is going on, the scope is inside the DOM, after CSS rendering. panel is called "rollform", console log shows "rollform-1099" when I attempt to get ref with "panel = Ext.ComponentQuery.query('rollform')[0];" in the function called in controller with afterrender.
I've created hundreds of these type apps but all other times a grid is the initial object bound to viewport. This is first attempt with a panel. There has to be something fundamental I don't understand.
Below is code from controller. The viewport simply uses Card layout with "rollform" as it's only item. It renders, I can see panel title. But can not find correct way to get reference to form fields to load server reply. It fails trying to load first form field from server reply in success function. Says it can't read "property" setValue of null. The console log of panel variable is the DOM instance object "rollform-1010". My scope is off and I'm out of things to try.
Thanks!
Capture.PNG
Comment