Only the parent page can have <head>.
The children pages should use <wicket:head> to contribute to the parent's <head>

Or just override #renderHead(IHeaderResponse) in .java.

On Sun, Jul 29, 2012 at 5:48 PM, kshitiz <k.agarw...@gmail.com> wrote:
> Hi,
>
> I have 3 pages:
>
> *Page1:*
>
> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
> Strict//EN&quot;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
>
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
>
> <body>
> *       <wicket:extend>
>
>         </wicket:extend>
> *
> </body>
> </html>
>
> *Page2:*
>
> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
> Strict//EN&quot;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
>
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
>     <head></head>
> <body>
>
>         <wicket:child />
> </body>
> </html>
>
> *and Page3:*
>
> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0
> Strict//EN&quot;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;>
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"
>
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
>
> <body>
>
>         <wicket:child />
> </body>
> </html>
>
> Page 1 extends from page2 and page2 extends from page3. Now the problem is I
> have a JS code which is being called from page1. When I put that code in
> page1 or page3, it does not work...but in page2...it runs smoothly!!!! Here
> is the JS:
> /
> /
>
> I am placing it between <head></head> element. How things are working here?
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Where-to-add-javascript-in-html-pages-which-follow-inheritance-relationship-tp4650855.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Reply via email to