Strategy for creating lazy load tabs

What is the strategy people use for creating lazy load tabs? That is, I have a TabSheet (or Accordion) that I’d like to display all sorts of options available, but not really build them until the Tab is referenced.

Do people just put in dummy Panels or the like to fill out the possible tabs, and then use the tab activated to detect if it’s the dummy panel and if so, then build the real view behind it?

Is there such a thing as a best practice for doing this?

Thanks!

I haven’t myself had the need of creating lazy initializing tab sheets on the server side so I don’t have real experience in the matter. I would probably just have an empty layout in all but the first one, and attach a TabChangeListener (or called something similar) which will initialize and attach the uninitialized tabs the first time they are opened.

The main reason of my post, however, was that I wanted to point out that the client side of TabSheet is lazy. The DOM will be added to the client side only when the user opens up the tab. If the client side rendering is the main problem then server side lazy loading will not help. If it actually is that the server side part of it is what is the problem, then carry on :slight_smile:

The
Toolkit Productivity Tools
add-on has a wrapper for components that should be loaded lazily on the server side, showing to the user that something is going on while loading the component. This might also help.