View Full Version : Checkbox closes RowExpander in Grid

5 Jan 2010, 12:11 AM
I have a Paging Grid with a RowExpander present.

In my case, when the row expands, I am creating a panel rather then sending it a template. I need a form in the expansion..

expander = new ExtendedRowExpander() {
java.util.Map<El, PolicyDetail> layouts = new java.util.HashMap();

protected boolean beforeExpand(ModelData model, Element body, El row, int rowIndex) {
Info.display("EXPAND","Got ExpandRow?");
if (fireEvent(Events.BeforeExpand)) {
return makePanel(body, row, rowIndex);
return false;

protected void collapseRow(El row) {
Info.display("COLLAPSE","Got CollapsesRow?");
if (fireEvent(Events.BeforeCollapse)) {
row.replaceStyleName("x-grid3-row-expanded", "x-grid3-row-collapsed");
// Detach so we don't bleed memory
} else {

protected boolean makePanel(Element body, El row, int rowIndex) {
PolicyDetail theDetail = new PolicyDetail(row, grid, rowIndex, (BeanModel) store.getAt(rowIndex));
layouts.put(row, theDetail);
return true;


Works great! However in the 'PolicyDetail' panel I have some checkboxes.

IF I call setName on a checkbox the resulting checkbox, when clicked, closes the expanded row.

it fires no events that I can detect. It just closes.

Removing the call to setName makes this problem go away (but then messes up my FormBinding).

Maybe I am using this feature wrong, not sure, but it seems odd that setName toggles this behavior.

5 Jan 2010, 9:12 AM
in this case it is the best to post a full working example which shows the problem in one class (including the EntryPoint). also post with your code the class for ExtendedRowExpander - all customized things can make this problem.

it would be also nice if you make your rowexpander with custom widget more generic as a own class :-)
maybe something like the gridcellrenderer but for rowexpaner...


i added a generic RowExpander with GridCellRenderer in this thread