On 11/10/06, James McLaughlin <[EMAIL PROTECTED]> wrote:
Hello,
I have a need for an interface that is a twin to IHeaderContributor, but
which will contribute javascript to be executed after the html has been
rendered on the client. I realize all the hooks are there with
WebPage.getBodyContainer().addOnLoadModifier(), and
AjaxRequestTarget.appendJavascript(), but this requires the
component/behavior to know what the current RequestTarget is.
Did you try this http://dean.edwards.name/weblog/2005/09/busted/ ?
That looks like an elegant solution to me, if it works.
*If* that works, we could make that the basis of OnLoadContributor. If
it doesn't, well, we could create an OnLoadContributor that appends at
the end of the rendered page. Anyone knows whether that can result in
additional problems (I can't think of any)?
Personally, I think and OnLoadContributor that works much like
HeaderContributor would be a lot nicer than the current pattern we
have.
Eelco