On Friday, October 2, 2015 at 1:14:34 AM UTC+2, Patrick May wrote:
My application consists of a SplitLayoutPanel that has a StackLayoutPanel with two menu selections on the left and a DeckLayoutPanel on the right. The DeckLayoutPanel has two subpanels, one a SimpleLayoutPanel containing a Label and one a DockLayoutPanel containing a Label and another SimpleLayoutPanel. The last SimpleLayoutPanel contains a DataGrid.SplitLayoutPanel (TestUI)|+ StackLayoutPanel| || + CellList (Profile)| || + CellList (Admin)|+ DeckLayoutPanel|+ SimpleLayoutPanel| || + Label|+ DockLayoutPanel (BudgetPanel)|+ Label|+ SimpleLayoutPanel (LedgerPanel)|+ DataGridAll subpanels have their height and width set to 100% by their containing panels.
Don't do that. ProvidesResize panels do set the size of their children.
The code is all available here: https://github.com/patrickmay/data-grid-issue/ tree/master/TestUI Expected BehaviorThe expected behavior is that clicking on the "Budget" menu item in the StackLayoutPanel will show the BudgetPanel, including the LedgerPanel's DataGrid.Observed BehaviorWhen the "Budget" menu item is clicked, the DockLayoutPanel is displayed, with its header Label, the DataGrid column headers are displayed, but the DataGrid rows do not appear.
Possibly related to https://github.com/gwtproject/gwt/issues/4694 (or similar bug).
Try calling forceLayout() on the DockLayoutPanel when you switch to it in the DeckLayoutPanel.
When a Label is added to the south area of the DockLayoutPanel, the application compiles but nothing is displayed, not even the top level StackLayoutPanel.
IIRC, the "center" area must always be added last. Calling addSouth() before add() might be enough to fix the problem (it's been a while since I last manipulated layout panels)
When the DataGrid is replaced with a CellTable, the data is displayed (although the height of each row is much more than necessary to hold the data).
This is (probably) because the widget is given explicit dimensions by the SimpleLayoutPanel (through the ProvidesResize/RequiresResize chain up to the RootLayoutPanel).
-- You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment