Search code examples
gwtgxt

How to add LoadMask on ContentPanel in GXT?


I'm using GXT 2.2.4.

Is there possibility to add LoadMask on ContentPanel (just like setLoadMask for Grid)?


Solution

  • The Grid.setLoadMask function takes a boolean, and tells the grid that when the associated loader is pulling in more items (remote paging, sorting, filtering, etc), the Component.mask(String) and Component.unmask(). This can be built in because Grid understands having a loader that it can listen for events from (before load, load exception, load complete) to start and stop the mask.

    In a ContentPanel or some other Component that doesn't have a built in loader, etc, you can still have this behavior - call something like panel.mask("Loading...") when the load starts, and panel.unmask() when it is complete.