On 11/22/05, Scott Sauyet <[EMAIL PROTECTED]> wrote: > >> == Scott Sauyet <[EMAIL PROTECTED]> > > == Juergen Donnerstag <[EMAIL PROTECTED]> > > Thanks for the info, Juergen. > > >> 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? > > > 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). > > Okay. I guess that makes sense; how often would people want to be > messing directly with the body tag, anyway? Always causing problems, I > am.
That is ok. Don't stop challenging us. >Could someone point me to where in the source code this happens? I > don't really know my way around Wicket internals yet, but I'd like to > see this, and it's not in WebPage, which was my first guess. BodyOnLoadHandler, BodyOnLoadResolver, BodyOnLoadContainer > > > > 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. > > I'm not quite sure what to put in an RFE here. RFE: allow wicket:id on <body> tag which currently is not possible due to wickets body onLoad handling. >I don't particularly > want to add a "wicket:id" to the body. If there is a way to retrieve > the MarkupContainer being used for the body so that I can add an > AttributeModifier to it, that would solve my problem. But I don't yet > know if I already can do that. > You can. It is a component added to the page with id "_body". But it is created at render time and hence is not available within your constructor. So it become a bit tricky. Actually I would not advice you to go that road. It is hacky and not acutally the "easy" wicket way. > > >> 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? not sure there is. Can not think of any right now. > > I still would like to know if there is some other easier way of doing > this. Any suggestions? ------------------------------------------------------- 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