PDA

View Full Version : forceLayout not working with custom column renderer



extAsplode
1 Feb 2011, 11:51 AM
I have a TabPanel with 2 tabs, let's say tab A and tab B. Tab B used to be shown by default when the user visits the view. Tab B contains a grid with a columnModel with 2 columns that have custom renderers. These renderers return an HTML input tag to render an HTML checkbox in the column. When the user clicks a button outside the TabPanel, I want to be able to gather up the user's selections in these checkboxes. Previously, when tab B was the default, the following code was working, but now that I'm trying to change the default activeTab to tab A, it's not:

var checkedInColumn1 = Ext.query('.specialClassName1:checked');
var checkedInColumn2 = Ext.query('.specialClassName2:checked');

Now that tab A is default, if I click the magic button to execute the above line of code, I get an empty array. I figured I just needed to set forceLayout on the configs, but it doesn't seem to be working. Note that if I switch to tab B before clicking the button, it works just fine, so it's definitely some kind of layout-related issue.

The code involved is pretty huge, so I didn't attach it in the hopes that somebody might have a solution without.

I'd appreciate any help! Thanks!

Andy