Re: could IAjaxCallDecorator implement IHeaderContributor
https://issues.apache.org/jira/browse/WICKET-3059 2010/9/17 Igor Vaynberg igor.vaynb...@gmail.com: add an rfe to jira. -igor On Fri, Sep 17, 2010 at 7:43 AM, Michal Kurtak michal.kur...@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 mgrigo...@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 michal.kur...@gmail.comwrote: 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: could IAjaxCallDecorator implement IHeaderContributor
Extend org.apache.wicket.ajax.AbstractDefaultAjaxBehavior then override renderHead(IHeaderResponse) and getAjaxCallDecorator() On Fri, Sep 17, 2010 at 3:50 PM, Michal Kurtak michal.kur...@gmail.comwrote: 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: could IAjaxCallDecorator implement IHeaderContributor
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 mgrigo...@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 michal.kur...@gmail.comwrote: 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: could IAjaxCallDecorator implement IHeaderContributor
add an rfe to jira. -igor On Fri, Sep 17, 2010 at 7:43 AM, Michal Kurtak michal.kur...@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 mgrigo...@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 michal.kur...@gmail.comwrote: 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-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org