:: Forum >> Version 2 >>

Problems displaying two grids in included jsp

Hi

I am using the AW.Grid.Extended grid in a web application. I have a webpage which includes two other jsp pages, each containing their copy of the AW.Grid.Extended (identityTable and permissionTable). When the webpage is first loaded the identityTable is displayed correctly (jsp include with div that have the style display:block) and the jsp which inlcudes the permissionTable is not displayed (style display:none). When a press a link to display the permissionTable include (sets the style of the permissionTable div to display: block, and the div for the identityTable to style:display:none) the permissionTable is showing, but no headerText is showing and all the contents of the table is shifted one column to left. When I display the identityTable again it gets the headers and the content of the permission table.

It would be great if you could help me on this problem. Below is the code.
Note: I have tried to set the style display as a css class, but nothing changed.

Definition of the identityTable in the identity div(originally with display:block)
var identityTable = new AW.Grid.Extended;

//identityTable.setId("myGrid");
identityTable.setCellText(dummyIdentityData); // 2-dimensional js array
identityTable.setHeaderCount(1);
identityTable.setHeaderText(["Type", "Name", "Description", "Creation Date", "Creating User"], 0); // js array for the second row of headers
identityTable.setColumnCount(5);
identityTable.setRowCount(20);
identityTable.setSelectorText(function(i){return this.getRowPosition(i)+1});
document.write(identityTable);

Definition of the permissionTable in the permission div(originally with display:none):
var permissionTable = new AW.Grid.Extended;
//permissionTable.setId("myGrid"); -dimensional js array
permissionTable.setCellText(function(col, row){return col + "." + row});
permissionTable.setHeaderCount(1);
permissionTable.setHeaderText(["Type", "Name", "Description", "Access Type", "Expression"], 0); // js array for the second row of headers
permissionTable.setColumnCount(5);
permissionTable.setRowCount(20);
permissionTable.setControlSize(550,400);
document.write(permissionTable);

Thanks, Linda
Linda
Friday, September 29, 2006
There is a bug in AW 2.0.1 where the grid inside display:none block does not initialize correctly. Please either use visibility:hidden instead or just add the grid 'on-demand' when it should become visible using

parentDIV.innerHTML = grid;

Alex (ActiveWidgets)
Friday, September 29, 2006



This topic is archived.

Back to support forum

Forum search