You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by coincoinfou <ol...@gmail.com> on 2011/07/28 19:52:08 UTC

Sometimes a long time to construct page with tabs

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org