Hmm.. This does sound logical. But then we should use doctype of the component (inherited page) and put it in front, ignoring the doctype of the parent page.

Still, having wiclet:extend before doctype does not work well. I for example use xhtml strict model, which makes IE6 behave much nicer. When the doctype is missing, the page gets rendered in quirks mode.

Even if it is a hack, i think doctype should be first, no matter what. Maybe there should be a poll on this to see what others think?

-Matej

Juergen Donnerstag wrote:
I did the change last night on my laptop and it works. But prior to
committing it I'd like to explain the logic of the current
implementation. I want to be sure, that the change does make sense.

Current approach:
We read the markup directly associated with the component
We check if the markup contains a <wicket:extend>
If it does NOT contain wicket:extend than proceed in the normal way
If it does contain wicket:extend
   autoAdd a MarkupInheritanceComponent. Like all components, is first
renders its tag (which is <wicket:extend>), than the body and than the
close tag (</wicket:extend>).
Thus the base markup is read while handling the inheritance
component's body and the ouput nicely reflects the program flow.

I'm not sure it could make myself clear. Form a wicket point of view
and the way we usually handle components, the current
implementation/behaviour is like we handle all other components. The
requested change would make it an exception.

The current implementation, though, as pointed out by Matej, does
produce output (with setStripWicketTag(false)) which is not HTML
compliant. <wicket:extend> will be even beore the doctype.
setStripWicketTag(TRUE) /should/ remove it from output and make the
output compliant.

I guess the question is, what is more important.

Juergen

On 7/27/05, Matej Knopp <[EMAIL PROTECTED]> wrote:

Juergen Donnerstag wrote:

I agree, nothing should go before doctype. But we don't test it.
Actually you might add doctype whereever you want to. I think none of
the web frameworks validates the output. They all rely on external
(X)HTML validators to do so. The special case with Wicket are of
course the wicket tags and attributes. Which is why setStripWicketTags
should remove them (in order to make the output compliant).

Hmm but actually I think you're right. I'd expect something like
<!doctype...>
<html>
 <body>
   <wicket:child><wicket:extend>
     <span>
   </wicket:extend></wicket:child>
 </body>
</html>

Exactly.

I'l check it.

Thanks.

-MAtej

Juergen


On 7/27/05, Matej Knopp <[EMAIL PROTECTED]> wrote:


Hmm.. If this is default behavieor, then I think it's a little bit
weird. Having <wicket:extend> before doctype causes problems.

I still don't understand the reason for this. Having markup like this

[parent]
<!doctype...>
<html>
<body>
  <wicket:child/>
</body>
</html>

[child]
<wicket:extend>
<span...>
</wicket:extend>

and the result being

<wicket:extend><!doctype...>
<html>
<body>
  <span>
</body>
</html>
</wicket:extend>

is corrent? I think _nothing_ should get before doctype. Doctype should
be the first thing to come out (except <?xml...?> of course). Or am I
missing something?

(I think result being
<!doctype...>
<html>
<body>
  <wicket:extend>
    <span>
  </wicket:extend>
</body>
</html>
would be the correct way)


-Matej


Juergen Donnerstag wrote:


Matej,

On 7/27/05, Matej Knopp <[EMAIL PROTECTED]> wrote:



Hi, I'm using 1.1 and I just tried markup inheritance. It works almost
ok, but there's one strange thing. The generated page source code starts
with <wicket:extend>. It's even before doctype, and that's bad.


I'd call it wicket standard behaviour. Tags are not automatically
moved within or removed from markup. And when you think about the
order the markup is read in case of markup inheritance, than it is
correct that it is even before the doctype. But ... see below




It's
there no matter if setStripWicketTags is on or off. Is this correct
behavior?


thiis is a bug. setStripWicketTags(true) should remove <wicket:extend>

from the output (and make doctype the first statement in your output).

Juergen


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

from IBM. Find simple to follow Roadmaps, straightforward articles,

informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies

from IBM. Find simple to follow Roadmaps, straightforward articles,

informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
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




-------------------------------------------------------
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