Just create the panel as an anonym class in your page or inner class...
Pseudo Snipplet:
Webpage extends page
{
Mypanel panel=new Mypanel();
This.add(panel);
}
Mypanel extends panel{}
As I remember it should work...
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zhang Hailong
Sent: 28. februar 2007 10:56
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Question about Panel
Hi all,
I found it is inconvenient to create a separate page and class for Panel every
time. Sometimes, I just want keep things as simple as possible. For example, I
just want to hide some components together, so I put them in a Panel.
Is it possible to use Panel like this?Or add this feature in later version?(I'm
using 1.2.4)
HTML:
<span wicket:id="myPanel">
<h3>
<label wicket:id="label">You believe</label>
</h3>
<ul>
<li wicket:id="lines">
<label wicket:id="text">text</label>
</li>
</ul>
</span>
Java:
Panel myPanel = new Panel("myPanel");
Label label = new Label("label", "test");
myPanel.add(label);
.....
Thanks.
Regards,
Hailong Zhang
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user