You can do it like this(pseudo):

html(parent):

<div>
 <div> -- Header </div>
 <div><ul><li wicket:id="listview"><a href="#" wicket:id="myLink"> </li></ul> 
</div>
  <div>-- footer --</div>
</div>


<wicket:child/>


java:
parentPage extends page...

private List menuItems;
protected const String linkId="myLink"
public void addMenuitem(Link link)
{
        
        menuItems.add(link);
}

parentPage(){

Listview listofLinks()=new Listview(menuItems){populateItems(item){
 item.add( item.getModelObject)
}}
add(header)
add(footer)

}


Java
ChildPage extends parentPage

public ChildPage(){

        addMenuItem(new Link(linkId){onclick...})

}

As for header or footer, I'd suggest that you provide defaults(method returning 
true/false), and then you can override them if you want to...

Remember to use the wicket:extend if your child page brings markup...




Mathias P.W Nilsson wrote:
Thanks!

How can this be done with markup inheritance.

I want to display a div menu like

<div>
  <div> -- Header </div>
  <div>content change for pages </div>
   <div>-- footer --</div>
</div>

The content for pages could be and <ul><li> with links. If I use inheritance
then the content will be in a parent page. I don't know how to proceed.

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to