Hi,

I having problem with wicket. I created page wich has a constructor with
parameters. It is OK, it is work as I expected. But I have noticed that this
constructor is called many times for the same request wich has caused that
application is very slow.

I entered debug mode and saw that there are 5 threads for the same request
and each thread calls that constructor. What am I missing? I mean what is
correct way to load data (from DB, using WS), I'm using constructor....

Data going to be loaded inside of GalleryPanel...

snippet:

public class GalleryPage extends IndexPage {

        private int galleryId;

        /**
         * @param parameters
         */
        public GalleryPage(PageParameters parameters) {
                super(parameters);

                galleryId = parameters.getInt("id");

init(galleryId);
        }

        private void init(int galleryId) {

                GalleryPanel galleryPanel = new GalleryPanel("gallery-panel", 
galleryId);

                addOrReplace(galleryPanel);
        }
}
-- 
View this message in context: 
http://www.nabble.com/Wicket---page-with-params-and-threads-tp21241854p21241854.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to