Sometimes it takes a long time to construct my page

She looks like this :

LoadableDetachableModel myObject = new LoadableDetachableModel(String id)
{
        String id;
        
        LoadableDetachableModel(String id) {
        this.id = id;
        }

  protected Object load() {
     return getDao().getMyObject();
  }
};

public Page extends Papage {


  LoadableDetachableModel myObject = new LoadableDetachableModel(id);
  
   List tabs=new ArrayList();
    tabs.add(new AbstractTab(new Model("panel1")) {
        public Panel getPanel(String panelId) { return new MyPanel1((Child1)
myObject.getChild1(); }
    });
    tabs.add(new AbstractTab(new Model("panel2")) {
        public Panel getPanel(String panelId) { return new MyPanel2(Child2)
myObject.getChild2(); }
    });
    tabs.add(new AbstractTab(new Model("panel3")) {
        public Panel getPanel(String panelId) { return new MyPanel3(Child3)
myObject.getChild3(); }
    });
        ....
        
        ....
    add(new TabbedPanel("tabs", tabs)

}

and my panels x10

class MyPanel extends Panel
{

    public MyPanel(Child1 child1)
    {
        super(id);
        add(new Label("label", child1.getChild1Ofchild1)) {     
                        override
                        isvisible() {
                        return child1 != null && !child1.isEmpty) {
                        } 
                
                add(new Label("label2", child1.getChild2Ofchild1)) {    
                        override
                        isvisible() {
                        return child1 != null && !child1.isEmpty) {
                        } 
                        
                        ....
                        ....
                        ....
    }
}

Sometimes it takes 20ms, somtimes 5s, sometimes 50s
What can explain this behaviour ?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Sometimes-a-long-time-to-construct-page-with-tabs-tp3701969p3701969.html
Sent from the Users forum mailing list archive at Nabble.com.

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

Reply via email to