Re: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2011-02-07 Thread Igor Vaynberg
now every component and behavior implement iheadercontributor (have a
renderhead method) and the response has the same methods that the old
contributors had. you want to contribute something, just override
renderhead().

you can contribute the template using
response.renderjavascript(template.tostring())

-igor



On Mon, Feb 7, 2011 at 3:28 AM, Daniel Soneira
 wrote:
> The migration wiki does not contain information on renamed / substitution
> classes.
> I know AbstractHeaderContributor is a thing of the past but those classes
> could be converted into Behaviors quite easily.
> Was there a reason to get rid of them in 1.5?
> TextTemplate still exists but there is no easy (read: already in core) way
> to use them as header contributors.
>
> Cheers,
> Daniel
>
> -
> 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: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2011-02-08 Thread Daniel Soneira
I didn't have a problem with converting my existing class (extending 
TextTemplateHeaderContributor). As I said, that's quite easy.


My reasons for posting to the list were to:
 - a) note, that the Wiki does not mention that those classes are gone 
/ how to substitute them.
 - b) question why they have no core behavior that simply override 
renderHead(...).


Maybe a little explanation in the JavaDoc of TextTemplate (seems to have 
been around in Wicket for quite some time) is enough to get people 
started on how to use them.
Seems to be a nice task for a simple (javadoc) patch for me (there's 
always a first time).

I'll try to update the migration Wiki too.

On 08.02.2011 07:33, Igor Vaynberg wrote:

now every component and behavior implement iheadercontributor (have a
renderhead method) and the response has the same methods that the old
contributors had. you want to contribute something, just override
renderhead().

you can contribute the template using
response.renderjavascript(template.tostring())

-igor



On Mon, Feb 7, 2011 at 3:28 AM, Daniel Soneira
  wrote:

The migration wiki does not contain information on renamed / substitution
classes.
I know AbstractHeaderContributor is a thing of the past but those classes
could be converted into Behaviors quite easily.
Was there a reason to get rid of them in 1.5?
TextTemplate still exists but there is no easy (read: already in core) way
to use them as header contributors.

Cheers,
Daniel

-
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



Re: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2014-07-20 Thread Shweta Agrawal
Hi 
I'm facing issue with StringHeaderContribuor will migration from 1.4 to 1.5.
Can you please help me ?
1. I'm using StringHeaderContribuor for Google analytic code 
public class GoogleAnalyticsHeaderContributor extends
StringHeaderContributor {

public GoogleAnalyticsHeaderContributor(BasePage page) {
super (getGAScript (page));
}
2. Adding the StringHeaderContributor component 
this.add(new StringHeaderContributor(""));

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/1-5-MIGRATION-Where-did-StringHeaderContributor-TextTemplateHeaderContributor-go-tp3263954p4666709.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: [1.5 MIGRATION] - Where did StringHeaderContributor / TextTemplateHeaderContributor go?

2014-07-21 Thread Martin Grigorov
Hi,

This has been simplified.
You should extend Behavior and contribute via #renderHead() method.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov


On Mon, Jul 21, 2014 at 9:12 AM, Shweta Agrawal <
shweta.agra...@lntinfotech.com> wrote:

> Hi
> I'm facing issue with StringHeaderContribuor will migration from 1.4 to
> 1.5.
> Can you please help me ?
> 1. I'm using StringHeaderContribuor for Google analytic code
> public class GoogleAnalyticsHeaderContributor extends
> StringHeaderContributor {
>
> public GoogleAnalyticsHeaderContributor(BasePage page) {
> super (getGAScript (page));
> }
> 2. Adding the StringHeaderContributor component
> this.add(new StringHeaderContributor(""));
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/1-5-MIGRATION-Where-did-StringHeaderContributor-TextTemplateHeaderContributor-go-tp3263954p4666709.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>