lmignon / GWTP-GXT3-SAMPLES

2 stars 1 forks source link

SimpleTabPanel setPanelContent() requires a forceLayout() #1

Closed jkida closed 11 years ago

jkida commented 11 years ago

On line #64 after the panelContent is added to the SimpleTab a forceLayout() was required to be called. For example if I added a Grid with a paging toolbar the toolbar was out of place, it was being hidden underneath the tabpanel. It would appear if you resized the browser window. This was fixed by simply added the forceLayout() after adding the panelContent.

FYI: The problem only occurred when loading a different tab first from the URL, and then clicking on a tab that had a paging toolbar in it. If you loaded the page with pagingtoolbar in it directly im assuming something else was calling forceLayout() causing it to render correctly.

I will make a pull Request with the fixes if youd like.

branflake2267 commented 11 years ago

The gxt containers like a gxt layout chain b/c some of them fire onResize or need layout data set. I would have to look at the source deeper to see what would be going on. A gwt panel could break the layout chain in that, it wouldn't set the child sizes properly, so forcelayout would have to be used possibly.

http://docs.sencha.com/gxt-guides/3/ http://docs.sencha.com/gxt-guides/3/ui/layout/LayoutContainers.html http://docs.sencha.com/gxt-guides/3/concepts/layouts/Layouts.html

branflake2267 commented 11 years ago

I'd be interested in seeing the pull :)

lmignon commented 11 years ago

Thanks for the comment and thé fix. I'll add you to thé commiters Lmi

John Kida notifications@github.com a écrit :

On line #64 after the panelContent is added to the SimpleTab a forceLayout() was required to be called. For example if I added a Grid with a paging toolbar the toolbar was out of place, it was being hidden underneath the tabpanel. It would appear if you resized the browser window. This was fixed by simply added the forceLayout() after adding the panelContent.

FYI: The problem only occurred when loading a different tab first from the URL, and then clicking on a tab that had a paging toolbar in it. If you loaded the page with pagingtoolbar in it directly im assuming something else was calling forceLayout() causing it to render correctly.

I will make a pull Request with the fixes if youd like.

— Reply to this email directly or view it on GitHub.