petoendre / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 0 forks source link

ScrollTable and PagingScrollTable dataTable not show. #114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
* Create HorizontalSplitPanel contain a google map on the right, and a
button on the left. The button is to switch from the google to the
ScrollTable on the right widget of the splitPanel 
* if the map is set to the right widget using
HorizontalSplitPanel.setRightWidget() in OnModuleLoad() then when switch to
the table view using the same method. the headerTable is showed but the
data table is not showed. when I run at debug mode and look at dataTable
and it does contains data.
* if I set ScrollTable in OnModuleLoad(() then the dataTable does show and
switch between table View and Map View works just fine.

The same problem occur if use ScrollTable in a InfoWindow of GoogleMap

What version of the product are you using? On what operating system?
Ubuntu 7.10

Original issue reported on code.google.com by Tri...@gmail.com on 16 Jun 2008 at 11:55

GoogleCodeExporter commented 9 years ago

Original comment by ecc%google.com@gtempaccount.com on 19 Jun 2008 at 2:58

GoogleCodeExporter commented 9 years ago
After inspecting with firebug, I notice that the dataWrapper div has height set 
to
"0px". If I tweak it within firebug, I can force the table to render. 

I've managed to hack around this by subclassing the original ScrollTable and
overriding the resizeTablesVerticallyNow() method like so:

protected void resizeTablesVerticallyNow() {
  super.resizeTablesVerticallyNow();
  if ("0px".equals(DOM.getStyleAttribute(getDataWrapper(), "height")) && forceHeight
!= null && !"0px".equals(forceHeight)) {
    DOM.setStyleAttribute(getDataWrapper(), "height", forceHeight);
  }
}

I've also added a setter for forceHeight on the class.

This is obviously a fragile fix, but seems to work for now.

Original comment by jjo...@gmail.com on 29 Jun 2008 at 12:29

GoogleCodeExporter commented 9 years ago
Thanks i am having the same problem and will give your solution a try!

Original comment by nix...@gmail.com on 29 Oct 2008 at 8:35

GoogleCodeExporter commented 9 years ago
Four years later, same bug, workaround still works -- although now it's 
overriding redraw() instead of resizeTablesVerticallyNow().

Original comment by camer...@gmail.com on 22 Jun 2012 at 8:24