You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Michal Kurtak <mi...@gmail.com> on 2010/09/17 15:50:36 UTC
could IAjaxCallDecorator implement IHeaderContributor
Hi,
Is it possible to IAjaxCallDecorator implement IHeaderContributor?
For example ovverriden method form IAjaxCallDecorator looks like this:
public CharSequence preDecorateScript(CharSequence script)
{
"MyLibrary.call();" + script;
}
Where MyLibrary.call(); is javascript function defined in MyLibrary
namespace in external js file (mylibrary.js). I need to contribute
this file to head. What is the best place for this contribution?
I suppose if IAjaxCallDecorator would implement IHeaderContributor, it
would be perfect place.
Best regards,
Michal Kurtak
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: could IAjaxCallDecorator implement IHeaderContributor
Posted by Michal Kurtak <mi...@gmail.com>.
https://issues.apache.org/jira/browse/WICKET-3059
2010/9/17 Igor Vaynberg <ig...@gmail.com>:
> add an rfe to jira.
>
> -igor
>
> On Fri, Sep 17, 2010 at 7:43 AM, Michal Kurtak <mi...@gmail.com> wrote:
>> Thanks for your quick reply.
>>
>> Thats the way i do it right now. But the problem is that all ajax
>> components have behavior bundled inside so i must override not only
>> getAjaxCallDecorator but renderHead in all components. Its not
>> possible to achieve single point of functionality in one class (one
>> AjaxCallDecorator). Its just a proposal to IAjaxCallDecorator extend
>> IHeaderContributor.
>>
>> br,
>> Michal Kurtak
>>
>> 2010/9/17 Martin Grigorov <mg...@apache.org>:
>>> Extend org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
>>>
>>> then override renderHead(IHeaderResponse) and getAjaxCallDecorator()
>>>
>>> On Fri, Sep 17, 2010 at 3:50 PM, Michal Kurtak <mi...@gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> Is it possible to IAjaxCallDecorator implement IHeaderContributor?
>>>>
>>>> For example ovverriden method form IAjaxCallDecorator looks like this:
>>>> public CharSequence preDecorateScript(CharSequence script)
>>>> {
>>>> "MyLibrary.call();" + script;
>>>> }
>>>>
>>>> Where MyLibrary.call(); is javascript function defined in MyLibrary
>>>> namespace in external js file (mylibrary.js). I need to contribute
>>>> this file to head. What is the best place for this contribution?
>>>> I suppose if IAjaxCallDecorator would implement IHeaderContributor, it
>>>> would be perfect place.
>>>>
>>>> Best regards,
>>>> Michal Kurtak
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: could IAjaxCallDecorator implement IHeaderContributor
Posted by Igor Vaynberg <ig...@gmail.com>.
add an rfe to jira.
-igor
On Fri, Sep 17, 2010 at 7:43 AM, Michal Kurtak <mi...@gmail.com> wrote:
> Thanks for your quick reply.
>
> Thats the way i do it right now. But the problem is that all ajax
> components have behavior bundled inside so i must override not only
> getAjaxCallDecorator but renderHead in all components. Its not
> possible to achieve single point of functionality in one class (one
> AjaxCallDecorator). Its just a proposal to IAjaxCallDecorator extend
> IHeaderContributor.
>
> br,
> Michal Kurtak
>
> 2010/9/17 Martin Grigorov <mg...@apache.org>:
>> Extend org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
>>
>> then override renderHead(IHeaderResponse) and getAjaxCallDecorator()
>>
>> On Fri, Sep 17, 2010 at 3:50 PM, Michal Kurtak <mi...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> Is it possible to IAjaxCallDecorator implement IHeaderContributor?
>>>
>>> For example ovverriden method form IAjaxCallDecorator looks like this:
>>> public CharSequence preDecorateScript(CharSequence script)
>>> {
>>> "MyLibrary.call();" + script;
>>> }
>>>
>>> Where MyLibrary.call(); is javascript function defined in MyLibrary
>>> namespace in external js file (mylibrary.js). I need to contribute
>>> this file to head. What is the best place for this contribution?
>>> I suppose if IAjaxCallDecorator would implement IHeaderContributor, it
>>> would be perfect place.
>>>
>>> Best regards,
>>> Michal Kurtak
>>>
>>> ---------------------------------------------------------------------
>>> 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: could IAjaxCallDecorator implement IHeaderContributor
Posted by Michal Kurtak <mi...@gmail.com>.
Thanks for your quick reply.
Thats the way i do it right now. But the problem is that all ajax
components have behavior bundled inside so i must override not only
getAjaxCallDecorator but renderHead in all components. Its not
possible to achieve single point of functionality in one class (one
AjaxCallDecorator). Its just a proposal to IAjaxCallDecorator extend
IHeaderContributor.
br,
Michal Kurtak
2010/9/17 Martin Grigorov <mg...@apache.org>:
> Extend org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
>
> then override renderHead(IHeaderResponse) and getAjaxCallDecorator()
>
> On Fri, Sep 17, 2010 at 3:50 PM, Michal Kurtak <mi...@gmail.com>wrote:
>
>> Hi,
>>
>> Is it possible to IAjaxCallDecorator implement IHeaderContributor?
>>
>> For example ovverriden method form IAjaxCallDecorator looks like this:
>> public CharSequence preDecorateScript(CharSequence script)
>> {
>> "MyLibrary.call();" + script;
>> }
>>
>> Where MyLibrary.call(); is javascript function defined in MyLibrary
>> namespace in external js file (mylibrary.js). I need to contribute
>> this file to head. What is the best place for this contribution?
>> I suppose if IAjaxCallDecorator would implement IHeaderContributor, it
>> would be perfect place.
>>
>> Best regards,
>> Michal Kurtak
>>
>> ---------------------------------------------------------------------
>> 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: could IAjaxCallDecorator implement IHeaderContributor
Posted by Martin Grigorov <mg...@apache.org>.
Extend org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
then override renderHead(IHeaderResponse) and getAjaxCallDecorator()
On Fri, Sep 17, 2010 at 3:50 PM, Michal Kurtak <mi...@gmail.com>wrote:
> Hi,
>
> Is it possible to IAjaxCallDecorator implement IHeaderContributor?
>
> For example ovverriden method form IAjaxCallDecorator looks like this:
> public CharSequence preDecorateScript(CharSequence script)
> {
> "MyLibrary.call();" + script;
> }
>
> Where MyLibrary.call(); is javascript function defined in MyLibrary
> namespace in external js file (mylibrary.js). I need to contribute
> this file to head. What is the best place for this contribution?
> I suppose if IAjaxCallDecorator would implement IHeaderContributor, it
> would be perfect place.
>
> Best regards,
> Michal Kurtak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>