After making structural changes to a container, be sure to invoke (in GXT 2) the layout
method to re-run the layout routines. The alternative is to configure the LayoutContainer
to re-run layouts on each modification (using setLayoutOnChange
), but that would in this case be at least two re-layouts - one for removeAll, and another for each new object added. Could be needlessly expensive, so better to run once and for all when you are finished making changes.
(Worth pointing out perhaps that GXT 2.2.5 is just over two years old, 2.2.6, 2.3.0 have gone out since then, and it is being superseded by GXT 3. In GXT 3, the method here would be forceLayout
.)