Hello everybody,
I recently noticed a very peculiar problem related to disclosure
panels.
I am creating a flex table.
So the first row of the flex table contains the column headers.
So I first create the column headers on row 0 of my flex table.
I assign a specific width to each of the column cells in the flex's
row 0.
So my first function is createHeaders() for the flex.
Now the next thing that I do is populate the flex with some data.
While populating the data for each row.
I create a new Label object for the data and assign the labels width
by doing the following
1) Element elem=getCellFormatter().getElement(0, col);// this gets the
column from row 0
2) int cellWidth=elem.getClientWidth(); //this gets the width of the
cell from row 0
3) Label lbl= new Label("test label");
4) lbl.setStyleName("ellipsisLabel");
5) lbl.setWidth((cellWidth-10) +"px"); //sets the width for the label
in cells other that row 0
6) setWidget(row, col, lbl);
7) getCellFormatter().setWidth(row, col, cellWidth+"px"); //sets width
of the cells for rows other than row 0
Now I place this flex in a dock panel of a composite called
GRIDCOMPOSITE.
Now if I call the following line
RootPanel.get().add(Object of GRIDCOMPOSITE );
Now the flex works fine all the data,headers being displayed properly
But when I run this piece of code
panel = new DisclosurePanel();
panel.add(Object of GRIDCOMPOSITE);
RootPanel.get().add(panel);
step (2) returns me 0 i.e. I get cellWidth as 0 for a cell in row 0.
So consequently step(5) returns me an error
I cannot figure out why when I add my object of GRIDCOMPOSITE to a
disclosure panel I cannot get the widths of the columns of row 0.
Anybody got a clue...
Regards,
Cherian
Ensarm Solutions
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---