thephatp
08-28-2008, 07:48 PM
Hi Everyone,
I'm very much a newbie to ExtJS, and I've gone through a LOT of the tutorials, API Documentation, the non-API documentation, etc. However, I've become very frustrated with myself that I'm not really getting how all of it works.
I'm not new to OOP or Javascript, but I am new at OOP with Javascript, to a point. I have created "classes" before, but never to the complication of those in ExtJS.
I really want to learn how to use the libraries the right way, as I am in the middle of a huge project, and I could really use a LOT of this stuff. However, I don't understand how some of the examples work together. I'm trying to do something that I considered pretty darn basic, and I cannot figure it out for the life of me.
This is what I'm trying to do:
I'd like to create a TabPanel that has 3 different tabs, each containing a different DataGrid. That's simple enough...I got that to work. However, I now want to add a panel just below the TabPanel to display row details when a user clicks on a row in one (any) of the DataGrids. However, I only want one Panel for this, not three separate ones (like combining each grid with it's own details Panel in every tab of the TabPanel). In fact, I may want to change the location of this details Panel at a later point, so it can't be attached to the DataGrids or the TabPanel.
Sounds simple enough to me, but I can't seem to figure it out. I've spent tons of time pouring through the various examples and documentation, trying to learn it the right way. I may be able to find a way to get it to work eventually, but since I'm going to be adding Tabs later and possibly sending data from clicks to different Panels on the page, I'd really like to learn it the correct way and use "class" structures for the objects.
I don't completely understand the superclass constructor calling (scope) in relation to the objects being created. Also, I don't understand how to connect the different pieces together. I don't understand what the `items:` config property actually expects--I started thinking I could pass it two objects, say my DataGrid, and then say another Panel, but that has never worked. And finally, I don't understand how to display the objects on the page without using the "renderTo" config option, even though I've seen examples that accomplish this. As an aside, I don't want the whole page to be a panel, so I don't want to use a ViewPort.
I can post code if needed. Currently, I have the code broken up in 4 JS files: 3 of them are the 3 DataGrids I'm using, then the final one is for the TabPanel that contains the DataGrids. All of them use the Ext.onReady() function, which I know is not good, but I can't get around.
So, does anyone have an example of what I'm trying to accomplish that either (1) Is documented inline with the code explaining details to a newbie level; or (2) Is pretty obvious what is going on?
I really apologize for the ignorance, but I've been working on this for about a week now, and my progress has come to a halt.
Thanks in advance for any help/advice/direction/etc.
Chad
I'm very much a newbie to ExtJS, and I've gone through a LOT of the tutorials, API Documentation, the non-API documentation, etc. However, I've become very frustrated with myself that I'm not really getting how all of it works.
I'm not new to OOP or Javascript, but I am new at OOP with Javascript, to a point. I have created "classes" before, but never to the complication of those in ExtJS.
I really want to learn how to use the libraries the right way, as I am in the middle of a huge project, and I could really use a LOT of this stuff. However, I don't understand how some of the examples work together. I'm trying to do something that I considered pretty darn basic, and I cannot figure it out for the life of me.
This is what I'm trying to do:
I'd like to create a TabPanel that has 3 different tabs, each containing a different DataGrid. That's simple enough...I got that to work. However, I now want to add a panel just below the TabPanel to display row details when a user clicks on a row in one (any) of the DataGrids. However, I only want one Panel for this, not three separate ones (like combining each grid with it's own details Panel in every tab of the TabPanel). In fact, I may want to change the location of this details Panel at a later point, so it can't be attached to the DataGrids or the TabPanel.
Sounds simple enough to me, but I can't seem to figure it out. I've spent tons of time pouring through the various examples and documentation, trying to learn it the right way. I may be able to find a way to get it to work eventually, but since I'm going to be adding Tabs later and possibly sending data from clicks to different Panels on the page, I'd really like to learn it the correct way and use "class" structures for the objects.
I don't completely understand the superclass constructor calling (scope) in relation to the objects being created. Also, I don't understand how to connect the different pieces together. I don't understand what the `items:` config property actually expects--I started thinking I could pass it two objects, say my DataGrid, and then say another Panel, but that has never worked. And finally, I don't understand how to display the objects on the page without using the "renderTo" config option, even though I've seen examples that accomplish this. As an aside, I don't want the whole page to be a panel, so I don't want to use a ViewPort.
I can post code if needed. Currently, I have the code broken up in 4 JS files: 3 of them are the 3 DataGrids I'm using, then the final one is for the TabPanel that contains the DataGrids. All of them use the Ext.onReady() function, which I know is not good, but I can't get around.
So, does anyone have an example of what I'm trying to accomplish that either (1) Is documented inline with the code explaining details to a newbie level; or (2) Is pretty obvious what is going on?
I really apologize for the ignorance, but I've been working on this for about a week now, and my progress has come to a halt.
Thanks in advance for any help/advice/direction/etc.
Chad