//HTML <div wicket:id="panelListView"> <div wicket:id="runtimePanelItem"></div> </div>
your ListView model which is expected to be a List, determines the number of Panels to be dynamically created //Java ListView panelListView= new ListView("panelListView", model){ public void populateItem(ListItem item){ SomeModelObject object = item.getModelObject(); if(bla bla bla) item.add(new MyRuntimePanel("runtimePanelItem")); else item.add(new MyOtherRuntimePanel("runtimePanelItem"); } } infact you can insert some logic inside the ListView to determine which specific panel to add dynamically. On 2/8/08, Edvin Syse <[EMAIL PROTECTED]> wrote: > > Hi, > > Use a ListView or some other Repeater-component and implement a model > that returns a list of the classes that should be created as panels. If > you need a wicket:id on the surrounding div, that's fine, but not > needed. You would then do > > WebMarkupContainer cont = new WebMarkupContainer("cont"); > > Then you add the ListView to cont component istead of the page. > > Also, you would use the div with class a as the "base" for each listItem: > > <div class="a" wicket:id="conts">Panels here</div> > > -- Edvin > > mehdi b skrev: > > Hi all, > > > > I want to add some panels to my web page and the number of panels is > unknown. I want a <div wicket:id="cont"></div> in my template page and add > needed panels to this div (the number of panels is determined at run time). > > Besides, I want a surrounding <div class="a"></div> for each dynamic > panel on adding it to the page. > > > > Thanks > > > > > > --------------------------------- > > Looking for last minute shopping deals? Find them fast with Yahoo! > Search. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >