You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Lindner <li...@visionet.de> on 2009/06/07 18:43:46 UTC
Custom HeaderContributor
Is it possible to have a custom HeaderContributor?
Re: Custom HeaderContributor
Posted by Igor Vaynberg <ig...@gmail.com>.
if there is no factory add a jira to create one. this might, however,
be tricky because we use different instances for regular requests and
ajax requests because they have to do different things - so i do not
know how feasible a factory is or if we have to create both or what.
-igor
On Sun, Jun 7, 2009 at 10:15 PM, Stefan Lindner<li...@visionet.de> wrote:
> Hello Jeremy,
>
> you wrote "HeaderContributor is rather an implementation of IHeaderContributor - of which of course you could create your own implementations"
>
> Great to read, but how can I do this?
>
> -----Ursprüngliche Nachricht-----
> Von: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
> Gesendet: Montag, 8. Juni 2009 02:22
> An: users@wicket.apache.org
> Betreff: Re: Custom HeaderContributor
>
> HeaderContributor is rather an implementation of IHeaderContributor -
> of which of course you could create your own implementations. What
> you really seem to be seeking is to make each ajax behavior use a
> different header contributor. For that, you would need to override
> the way which each ajax behavior contributes script.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Sun, Jun 7, 2009 at 12:25 PM, Stefan Lindner <li...@visionet.de> wrote:
>> OK :-)
>> When I create a special AjaxBehavior I can overwrite the onRenderHead method which has an IHeaderContributor (=Header Contributor) as parameterJavaScript to the page's <head> section.
>> But every AjaxBehavior renders it's own <script>....</script> tag. I there are a lot of such AjaxBehaviors on a page then the header contains a huge number of <script>...</script> sections with only a few characters of javascript inside.
>> I found no possibility to combine all the small pieces in one <script>....</script> section.
>> So my idea was to use my own, extended version of HeaderContributor. Just like I can have a own version of Session. But where can I direct Wicket to use my extended version of HeaderContributor?
>>
>> ________________________________
>>
>> Von: Martin Funk [mailto:mafulafunk@googlemail.com]
>> Gesendet: So 07.06.2009 19:00
>> An: users@wicket.apache.org
>> Betreff: Re: Custom HeaderContributor
>>
>>
>>
>>
>> Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
>>
>>> Is it possible to have a custom HeaderContributor?
>>
>> err... could you elaborate a little more?
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: AW: Custom HeaderContributor
Posted by Martin Funk <ma...@googlemail.com>.
Hi Stefan,
I can see the pain you have with the <script>...</script> sections.
But looking at HeaderResponse#renderJavascript(..) I'd say wicket
might not be very helpful in aggregating all the script sections into
one.
My best shot would be trying to aggregate the Behaviors into one/fewer
Behaviors.
But you could always create a jira or put something on the 1.5
wishlist :-)
mf
Am 08.06.2009 um 07:15 schrieb Stefan Lindner:
> Hello Jeremy,
>
> you wrote "HeaderContributor is rather an implementation of
> IHeaderContributor - of which of course you could create your own
> implementations"
>
> Great to read, but how can I do this?
>
> -----Ursprüngliche Nachricht-----
> Von: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
> Gesendet: Montag, 8. Juni 2009 02:22
> An: users@wicket.apache.org
> Betreff: Re: Custom HeaderContributor
>
> HeaderContributor is rather an implementation of IHeaderContributor -
> of which of course you could create your own implementations. What
> you really seem to be seeking is to make each ajax behavior use a
> different header contributor. For that, you would need to override
> the way which each ajax behavior contributes script.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Sun, Jun 7, 2009 at 12:25 PM, Stefan Lindner
> <li...@visionet.de> wrote:
>> OK :-)
>> When I create a special AjaxBehavior I can overwrite the
>> onRenderHead method which has an IHeaderContributor (=Header
>> Contributor) as parameterJavaScript to the page's <head> section.
>> But every AjaxBehavior renders it's own <script>....</script> tag.
>> I there are a lot of such AjaxBehaviors on a page then the header
>> contains a huge number of <script>...</script> sections with only a
>> few characters of javascript inside.
>> I found no possibility to combine all the small pieces in one
>> <script>....</script> section.
>> So my idea was to use my own, extended version of
>> HeaderContributor. Just like I can have a own version of Session.
>> But where can I direct Wicket to use my extended version of
>> HeaderContributor?
>>
>> ________________________________
>>
>> Von: Martin Funk [mailto:mafulafunk@googlemail.com]
>> Gesendet: So 07.06.2009 19:00
>> An: users@wicket.apache.org
>> Betreff: Re: Custom HeaderContributor
>>
>>
>>
>>
>> Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
>>
>>> Is it possible to have a custom HeaderContributor?
>>
>> err... could you elaborate a little more?
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
AW: Custom HeaderContributor
Posted by Stefan Lindner <li...@visionet.de>.
Hello Jeremy,
you wrote "HeaderContributor is rather an implementation of IHeaderContributor - of which of course you could create your own implementations"
Great to read, but how can I do this?
-----Ursprüngliche Nachricht-----
Von: Jeremy Thomerson [mailto:jeremy@wickettraining.com]
Gesendet: Montag, 8. Juni 2009 02:22
An: users@wicket.apache.org
Betreff: Re: Custom HeaderContributor
HeaderContributor is rather an implementation of IHeaderContributor -
of which of course you could create your own implementations. What
you really seem to be seeking is to make each ajax behavior use a
different header contributor. For that, you would need to override
the way which each ajax behavior contributes script.
--
Jeremy Thomerson
http://www.wickettraining.com
On Sun, Jun 7, 2009 at 12:25 PM, Stefan Lindner <li...@visionet.de> wrote:
> OK :-)
> When I create a special AjaxBehavior I can overwrite the onRenderHead method which has an IHeaderContributor (=Header Contributor) as parameterJavaScript to the page's <head> section.
> But every AjaxBehavior renders it's own <script>....</script> tag. I there are a lot of such AjaxBehaviors on a page then the header contains a huge number of <script>...</script> sections with only a few characters of javascript inside.
> I found no possibility to combine all the small pieces in one <script>....</script> section.
> So my idea was to use my own, extended version of HeaderContributor. Just like I can have a own version of Session. But where can I direct Wicket to use my extended version of HeaderContributor?
>
> ________________________________
>
> Von: Martin Funk [mailto:mafulafunk@googlemail.com]
> Gesendet: So 07.06.2009 19:00
> An: users@wicket.apache.org
> Betreff: Re: Custom HeaderContributor
>
>
>
>
> Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
>
>> Is it possible to have a custom HeaderContributor?
>
> err... could you elaborate a little more?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Custom HeaderContributor
Posted by Jeremy Thomerson <je...@wickettraining.com>.
HeaderContributor is rather an implementation of IHeaderContributor -
of which of course you could create your own implementations. What
you really seem to be seeking is to make each ajax behavior use a
different header contributor. For that, you would need to override
the way which each ajax behavior contributes script.
--
Jeremy Thomerson
http://www.wickettraining.com
On Sun, Jun 7, 2009 at 12:25 PM, Stefan Lindner <li...@visionet.de> wrote:
> OK :-)
> When I create a special AjaxBehavior I can overwrite the onRenderHead method which has an IHeaderContributor (=Header Contributor) as parameterJavaScript to the page's <head> section.
> But every AjaxBehavior renders it's own <script>....</script> tag. I there are a lot of such AjaxBehaviors on a page then the header contains a huge number of <script>...</script> sections with only a few characters of javascript inside.
> I found no possibility to combine all the small pieces in one <script>....</script> section.
> So my idea was to use my own, extended version of HeaderContributor. Just like I can have a own version of Session. But where can I direct Wicket to use my extended version of HeaderContributor?
>
> ________________________________
>
> Von: Martin Funk [mailto:mafulafunk@googlemail.com]
> Gesendet: So 07.06.2009 19:00
> An: users@wicket.apache.org
> Betreff: Re: Custom HeaderContributor
>
>
>
>
> Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
>
>> Is it possible to have a custom HeaderContributor?
>
> err... could you elaborate a little more?
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Custom HeaderContributor
Posted by Stefan Lindner <li...@visionet.de>.
OK :-)
When I create a special AjaxBehavior I can overwrite the onRenderHead method which has an IHeaderContributor (=Header Contributor) as parameterJavaScript to the page's <head> section.
But every AjaxBehavior renders it's own <script>....</script> tag. I there are a lot of such AjaxBehaviors on a page then the header contains a huge number of <script>...</script> sections with only a few characters of javascript inside.
I found no possibility to combine all the small pieces in one <script>....</script> section.
So my idea was to use my own, extended version of HeaderContributor. Just like I can have a own version of Session. But where can I direct Wicket to use my extended version of HeaderContributor?
________________________________
Von: Martin Funk [mailto:mafulafunk@googlemail.com]
Gesendet: So 07.06.2009 19:00
An: users@wicket.apache.org
Betreff: Re: Custom HeaderContributor
Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
> Is it possible to have a custom HeaderContributor?
err... could you elaborate a little more?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Custom HeaderContributor
Posted by Martin Funk <ma...@googlemail.com>.
Am 07.06.2009 um 18:43 schrieb Stefan Lindner:
> Is it possible to have a custom HeaderContributor?
err... could you elaborate a little more?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org