nested table

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

nested table

preben
Hi

My wicket experience is quit rusty so forgive me if this is a simple question, but I have not been able to find any example of this.

I want to render at table with a nested table in one of the cells.

eg.



MyClass1
   String attribute1;
   String attribute2;
   
MyClass2
   String attribute1
   String attribute2
   List<MyClass1> listOfMyClass1


MyListToRender = List<MyClass2>


How would i render MyListToRender using repeaters with a nested List ?
Any example would be helpfull.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: nested table

Pedro Santos
Hi, you can nestle repeater components like:
new ListView("id", listOfClass2){
   onPopulate( item){
      item.add( ... );
      item.add(new ListView("id", listOfClass1OfThisClass2){
          onPopulate( innerItem ){
            innerItem.add( ... );
          }
      });
  }
}

2011/8/25 preben <[hidden email]>

> Hi
>
> My wicket experience is quit rusty so forgive me if this is a simple
> question, but I have not been able to find any example of this.
>
> I want to render at table with a nested table in one of the cells.
>
> eg.
>
>
>
> MyClass1
>   String attribute1;
>   String attribute2;
>
> MyClass2
>   String attribute1
>   String attribute2
>   List<MyClass1> listOfMyClass1
>
>
> MyListToRender = List<MyClass2>
>
>
> How would i render MyListToRender using repeaters with a nested List ?
> Any example would be helpfull.
>
> Thanks.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/nested-table-tp3769047p3769047.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


--
Pedro Henrique Oliveira dos Santos