Hi,

must be <head><wicket:head> ... </wicket:head></head>
Everything else doesn't make sense and is not supported
ok, I thought <wicket:head> is a replacement for <head>, mainly because of an example you gave for component javascript:

<wicket:head>
   <script type=\"text/javascript\">
       function testFunction(select) { alert(select); }
   </script>
</wicket:head>
<wicket:panel>
...
</wicket:panel>

So I assume this is different for pages and components. Or should it be <head><wicket:head>...</wicket:head></head> here as well?

I still can't get the components javascript into the final markup when used in an inherited page. When using the following markup the final page never contains the javascript alert code (even when adding head around wicket:head). It worked without inheritance, so something has to be wrong.

Please, please, please: Add exceptions when wicket:head tags are used in an invalid way. Why not throwing an exception when a wicket:head gets ignored stating the reasons (like: wicket:head is only valid in head for pages)? I doubt that I'm the only person who will come up with this kind of "invalid" markup.


Parent markup:

<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:wicket="http:// wicket.sourceforge.net/">

  <head>
    <title>Test</title>
    <link rel="stylesheet" type="text/css" href="css/test.css"/>
  </head>

    <body style="background-color:#E7EAFE;margin:0px;">

        <div>
              <wicket:child/>
        </div>

    </body>




Child markup:

<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:wicket="http:// wicket.sourceforge.net/">

  <wicket:extend>
       Test
  </wicket:extend>

</html>



Component (doesn't work even when adding a <head> around <wicket:head>):

<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:wicket="http:// wicket.sourceforge.net/">

  <wicket:head>
      <script type="text/javascript">
          alert("ignored");
      </script>
</head>

</html>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to