On 8/22/05, Ralf Ebert <[EMAIL PROTECTED]> wrote:
> 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>
>
It is not a replacement, you are right. The rule: If there is a
<head>, than <wicket:head> must be inside. If there is no <head>, than
<wicket:head> can life without it. Thus, <head> is optional.
> So I assume this is different for pages and components. Or should it
> be <head><wicket:head>...</wicket:head></head> here as well?
>
the same everywhere. Exceptions, if's and than's make thing difficult
and it should be easy.
> 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.
>
You are right. I'll try to fix it.
>
> 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>
>
>
where do you reference the component (from below) in your markup
(either parent or child) above? Somewhere I'd expect <span
wicket:id="myJavascriptComponent />
>
> 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>
>
Juergen
-------------------------------------------------------
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