pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edvin Syse <ed...@sysedata.no>
Subject Lazy loading Accordion content
Date Sun, 12 Jun 2011 08:59:07 GMT
My Pivot App uses JDK ServiceLoader to load "modules" for an Accordion. 
Some of the modules will pull data from a remote server and do some 
initialization when created so I want to do it when each panel is shown 
for the first time.

I want to check if my approach is viable: Most Panels are ScrollPanes, 
and they are ofcourse unexpensive to create. I then override the 
layout() method and to something like:

     protected void layout() {
         if (!initialized) {
             initialized = true;

This seems to work, but is it an OK approach?

-- Edvin

View raw message