It all has to do with <wicket:head> and panels being able to
contribute <body onLoad="xxx"> attributes to the page. In order to
support that feature, a webmarkupcontainer is automatically created
and associated with the body tag of the page (in case of an exception,
on the exception page you can see a _body component being a child of
the Page). That happens always because wicket does not know upfront if
there will be a panel contributing to the body or not (That will only
change in wicket 2). The webmarkupcontainer however it usually
invisble, it delegates all events to his parent (the page). The use
case where there is a wicket:id associated with the body is currently
not covered in the sources. Would you please open an RFI for it.
Thanks

Juergen

On 11/22/05, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> Why does the BODY allow an unused wicket:id attribute?
>
> I was trying to implement an enhancement to my markup-inheritance-based
> pages to add a "class" attribute to the body tag in order to make it a
> little easier to apply my CSS.  I added 'wicket:id="body"' to the body
> tag, and started adding a WebMarkupContainer.  When I realized that all
> my child classes could no longer call "add()" directly because of the
> new hierarchy, I abandoned my attempt by removing these changes and
> redeploying.  As I waited for the page to load, I remembered that I
> hadn't removed the attribute from the body tag, so I absolutely expected
> a Wicket exception.  Instead, the page loaded fine.
>
> So my first question is why don't I get an exception when there is a
> "wicket:id" attribute on the BODY tag and no corresponding Component on
> the Page?
>
> My second question is whether there is an easy way to add or modify the
> "class" attribute (or the "id" attribute) of the BODY tag?
>
> Any suggestions?  The first question I suppose is mere curiousity, but I
> really would like to do the second.
>
> Thanks,
>
>   -- Scott
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to