Yes, Johan is right. <wicket:head>'s parent tag must either be <html> or <head>. We should implement a check for that.
Juergen On 10/7/05, Johan Compagner <[EMAIL PROTECTED]> wrote: > try this: > > DeriverPanel.html: > ---------------------------- > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> > <html xmlns="http://www.w3.org/1999/xhtml"> > <head> > <wicket:head> > this should go to page head tag! > </wicket:head> > </head> > <body> > <wicket:extend> > derived panel stuff<br> > </wicket:extend> > </body> > </html> > > > On 10/7/05, Ari Suutari <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Here is a simple example: TestPage, BasePanel and DerivedPanel. > DerivedPanel > > tries to add stuff to <head>, using <wicket:head>. It works if I use > <wicket:panel> in > > DerivedPanel instead of <wicket:extend>. > > > > Ari S. > > > > > > TestPage.java: > > ----------------- > > package syncrontech.examples.blastfurnace.wicket.test; > > > > import wicket.markup.html.WebPage; > > import wicket.markup.html.border.BoxBorder; > > import wicket.markup.html.form.TextField; > > import wicket.markup.html.image.Image; > > > > public class TestPage extends WebPage > > { > > public TestPage() > > { > > add(new DerivedPanel()); > > } > > } > > > > TestPage.html : > > -------------------- > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> > > <html xmlns="http://www.w3.org/1999/xhtml"> > > <head> > > </head> > > <body> > > from page<br> > > <span wicket:id="panel"></span> > > back to page<br> > > </body> > > </html> > > > > BasePanel.java: > > ------------------ > > package syncrontech.examples.blastfurnace.wicket.test; > > > > import wicket.markup.html.panel.Panel; > > > > public class BasePanel extends Panel > > { > > public BasePanel() > > { > > super("panel"); > > } > > } > > > > BasePanel.html: > > ---------------------- > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml "> > > <head> > > </head> > > <body> > > <wicket:panel> > > from basepanel<br> > > <wicket:child/> > > back to basepanel<br> > > </wicket:panel> > > </body> > > </html> > > > > DeriverPanel.java: > > --------------------- > > package syncrontech.examples.blastfurnace.wicket.test; > > > > import wicket.markup.html.panel.Panel; > > > > public class DerivedPanel extends BasePanel > > { > > public DerivedPanel() > > { > > > > } > > } > > > > > > DeriverPanel.html: > > ---------------------------- > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml"> > > <head> > > </head> > > <body> > > <wicket:head> > > this should go to page head tag! > > </wicket:head> > > <wicket:extend> > > derived panel stuff<br> > > </wicket:extend> > > </body> > > </html> > > > > > > > > ----- Original Message ----- > > From: "Juergen Donnerstag" <[EMAIL PROTECTED]> > > To: <[email protected] > > > Sent: Friday, October 07, 2005 12:35 PM > > Subject: Re: [Wicket-user] <wicket:head> and <wicket:extend> > > > > > > > Ari, > > > > > > there are junit test cases in src/test which should test exactly what > > > you ask for. That is, the functionality already exists, but obviously > > > not flawless. Good you please be a bit more precise (may be a stripped > > > down test case) which shows the problem. > > > > > > Thanks > > > Juergen > > > > > > On 10/7/05, Ari Suutari <[EMAIL PROTECTED]> wrote: > > >> Hi, > > >> > > >> I just tried to use <wicket:head> with Panels. Works very nicely > > >> when I have panel html as <wicket:panel>. However, when using > > >> markup inheritance (I like it very much !) and <wicket:extend> it looks > > >> like the <wicket:head> doesn't add anything to <head>. > > >> > > >> Would be great if this worked also. > > >> > > >> Ari S. > > >> > > >> > > >> > > >> > ------------------------------------------------------- > > >> This SF.Net email is sponsored by: > > >> Power Architecture Resource Center: Free content, downloads, > discussions, > > >> and more. http://solutions.newsforge.com/ibmarch.tmpl > > >> _______________________________________________ > > >> Wicket-user mailing list > > >> [email protected] > > >> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > >> > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: > > > Power Architecture Resource Center: Free content, downloads, > discussions, > > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > > _______________________________________________ > > > Wicket-user mailing list > > > [email protected] > > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Power Architecture Resource Center: Free content, downloads, discussions, > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > _______________________________________________ > > Wicket-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
