look around in the area of HeaderContributor and how it is used in JavascriptPackageResource.getHeaderContributor

and keep in mind, when implementing the method renderHead of class HeaderContributor, that IHeaderResponse contains a method .renderOnDomReadyJavascript(

mf
Am 08.04.2009 um 15:13 schrieb Craig Tataryn:

On 8-Apr-09, at 3:27 AM, Martijn Dashorst wrote:

On Wed, Apr 8, 2009 at 4:04 AM, Craig Tataryn <[email protected]> wrote:
but the JavaDoc tells me not to use this
method as it's supposed to be used by Wicket internally only. And they use
capital letters too when telling me this.

That is because a kitten gets killed every time you call such methods. ;-)

You can call such methods, but you should be aware that we reserve the
right to remove those methods in a new version, or change the
behavior. These methods often also do things inside of Wicket
internals that might hinder proper request processing (you might call
a method before it is supposed to be called, causing ill effects such
as doing expensive things twice or throw NPE's, or a long time after
it is supposed to be called and leave a mess).

If you need that method, you can call it, but you're on your own :)


Thanks Martijn, is there another way one might be able to get the Markup Component in renderHead? The one you get from the incoming container is of course the <head> tag.

The scenario I'm using this for must be a common one, I'm using response.renderOnDomReadyJavascript(someJs) within renderHead() and the code within someJs contains some javascript that has document.getElementById(mycomponentId).

Craig.

Martijn

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to