Is this what you mean?
http://wicket.apache.org/examplemarkupinheritance.html


-----Original Message-----
From: Muro Copenhagen [mailto:copenha...@gmail.com]
Sent: Thursday, January 21, 2010 1:16 PM
To: users@wicket.apache.org
Subject: Adding child to parent component

Hi,

Can anyone tell me if it is possible to extend a panel, and adding the child
panel inside a component of the parent panel.

So i'm looking for something like this:

Parent extends Panel {

    public Parent (String id) {
        super(id);
        WebMarkupContainer div = new WebMarkupContainer("myDiv");
        add(div);
    }
}

Child extends Parent {
    public Child (String id) {
    super(id);
    add(new Label("label", "HelloWorld");
}

Then the web part of the Parent panel should be something like:

<wicket:panel>
   <div wicket:id="myDiv"><wicket:child /></div>
</wicket:panel>


So how to add the child to a component on the parent rather than adding on
head level ?

Any ideas ?

Best Regards
Muro

The information contained in this communication is confidential, intended 
solely for the use of the individual or entity to whom it is addressed and may 
be legally privileged and protected by professional secrecy. Access to this 
message by anyone else is unauthorized. If you are not the intended recipient, 
any disclosure, copying, or distribution of the message, or any action or 
omission taken by you in reliance on it is prohibited and may be unlawful. 
Please immediately contact the sender if you have received this message in 
error. This email does not constitute any commitment from Cordys Holding BV or 
any of its subsidiaries except when expressly agreed in a written agreement 
between the intended recipient and Cordys Holding BV or its subsidiaries. 
Cordys is neither liable for the proper and complete transmission of the 
information contained in this communication nor for any delay in its receipt. 
Cordys does not guarantee that the integrity of this communication has been 
maintained nor that the communication is free of viruses, interceptions or 
interference. If you are not the intended recipient of this communication 
please return the communication to the sender and delete and destroy all copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to