Why not something like this?

public abstract class MyContainerPage extends WebPage
{
   public MyContainerPage()
   {
      add( getHeaderPanel( "header" ) );
      add( getLeftMenuPanel( "left-menu" ) );
   }

   public abstract WebMarkupContainer getLeftMenuPanel( String id );
   public abstract WebMarkupContainer getHeaderPanel( String id );
}


<body>
     <div wicket:id="header"></div>
     <div wicket:id="left-menu"></div>
</body>


Aaron


Chris Colman wrote:
You should read <wicket:child> tag as extends keyword... This way wicket works.

I would like to read <wicket:child> as the 'abstract' keyword - then,
like abstract methods, I'm telling wicket that an implementation will be
provided for this 'placeholder' in a markup that extends this markup
and, like abstract methods, I can have more than one of them per markup.

The 'extends' part is already declared by the hierarchy of my Java
classes. I have inheritance (extends) in my page class hierarchy
regardless of whether or not I choose to use the <wicket:extend> keyword
- which is much more akin to declaring deferred method implementation
(overloading) than class extension (although obviously it requires the
class to be extended for overloading to work).

Why are you looking for different solution when there are many more
which works great?

I use panels extensively but I wish to be able to use my extensive page
class hierarchy to cleverly dictate which panels get loaded by the
different classes in various places in the page class hierarchy.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to