You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alex Objelean <al...@isdc.ro> on 2007/11/29 11:08:52 UTC

[RFE] HeaderContributor.forFavicon(Reference)

I find it very useful to be able to add a favicon reference easily, using
HeaderContributor. What do you think?


Note: 
Favicon is a link with the following attributes: rel: "shortcut icon" &
type: "image/x-icon". 
For example: <link rel="shortcut icon" type="image/x-icon"
href="/resources/....favicon.ico"></link>

Alex.
-- 
View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14022731
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Alex Objelean <al...@isdc.ro>.
That's nice idea. My opinion that any type of abstraction that helps a
developer to write a simpler code is good. 

Alex


Ryan Sonnek-2 wrote:
> 
> -1 for this.
> 
> I'm very much against the current "static util" pattern that the
> HeaderContributor object is headed.  I would much rather have this
> behavior moved into the appropriate class (ex:
> JavascriptResource.headerContribution()) instead of bloating
> HeaderContributor.  this is how i designed the wicket FeedResource.
> http://www.jroller.com/wireframe/entry/wicket_feedresource
> 
> On Nov 29, 2007 8:00 AM, Alex Objelean <al...@isdc.ro> wrote:
>>
>> Also this can be done extending PackagedResourceReference, but this is
>> not
>> the point.
>> I found myself copying the same code from one project to another, just
>> because wicket core does not provide a common way to add favicons. I
>> think,
>> that since HeaderContributor has already: forCss & forJavaScript, it
>> would
>> not be a big deal to add also forFavicon method.
>>
>> Regards,
>> Alex.
>>
>>
>>
>> Matej Knopp-2 wrote:
>> >
>> > You can do this by directly using IHeaderResponse.renderString().
>> > e.g. make a custom behavior that implements IHeaderContributor and
>> > call this from it's renderHead.
>> > I don't think we need this in HeaderContributor itself. But others
>> > might have different opinion.
>> >
>> > -Matej
>> >
>> > On Nov 29, 2007 11:08 AM, Alex Objelean <al...@isdc.ro>
>> > wrote:
>> >>
>> >> I find it very useful to be able to add a favicon reference easily,
>> using
>> >> HeaderContributor. What do you think?
>> >>
>> >>
>> >> Note:
>> >> Favicon is a link with the following attributes: rel: "shortcut icon"
>> &
>> >> type: "image/x-icon".
>> >> For example: <link rel="shortcut icon" type="image/x-icon"
>> >> href="/resources/....favicon.ico"></link>
>> >>
>> >> Alex.
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14022731
>> >> Sent from the Wicket - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> 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
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14025400
>>
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14025956
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Ryan Sonnek <ry...@gmail.com>.
issue created:
https://issues.apache.org/jira/browse/WICKET-1192

I'd be happy to help get this fixed for 1.4 if desired!

On Nov 29, 2007 4:14 PM, Alex Objelean <al...@isdc.ro> wrote:
>
> Could it be possible, until the 1.4 appears, to add forFavicon static utility
> method?
>
>
>
> Eelco Hillenius wrote:
> >
> > On Nov 29, 2007 12:15 PM, Ryan Sonnek <ry...@gmail.com> wrote:
> >> Understood.  Just want to make it aware that the current pattern makes
> >> it impossible for other projects (wicketstuff) to add header
> >> contributions in the "standard/supported" way.  When I created the
> >> FeedResource, it became painfully obvious that the current pattern
> >> should be changed for the sake of future extension points.
> >
> > You could file an RFE for it and we can discuss it for 1.4
> >
> > Eelco
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14035092
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
>
> 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Alex Objelean <al...@isdc.ro>.
Could it be possible, until the 1.4 appears, to add forFavicon static utility
method?


Eelco Hillenius wrote:
> 
> On Nov 29, 2007 12:15 PM, Ryan Sonnek <ry...@gmail.com> wrote:
>> Understood.  Just want to make it aware that the current pattern makes
>> it impossible for other projects (wicketstuff) to add header
>> contributions in the "standard/supported" way.  When I created the
>> FeedResource, it became painfully obvious that the current pattern
>> should be changed for the sake of future extension points.
> 
> You could file an RFE for it and we can discuss it for 1.4
> 
> Eelco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14035092
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 29, 2007 12:15 PM, Ryan Sonnek <ry...@gmail.com> wrote:
> Understood.  Just want to make it aware that the current pattern makes
> it impossible for other projects (wicketstuff) to add header
> contributions in the "standard/supported" way.  When I created the
> FeedResource, it became painfully obvious that the current pattern
> should be changed for the sake of future extension points.

You could file an RFE for it and we can discuss it for 1.4

Eelco

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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Ryan Sonnek <ry...@gmail.com>.
Understood.  Just want to make it aware that the current pattern makes
it impossible for other projects (wicketstuff) to add header
contributions in the "standard/supported" way.  When I created the
FeedResource, it became painfully obvious that the current pattern
should be changed for the sake of future extension points.

On Nov 29, 2007 2:54 PM, Eelco Hillenius <ee...@gmail.com> wrote:
> On Nov 29, 2007 11:37 AM, Ryan Sonnek <ry...@gmail.com> wrote:
> > I don't quite understand this...
> > "Instead of having to know a ton of classes, you just have to know this one."
> >
> > I really struggled with wicket originally when trying to do these
> > header contributions.  I was using the IDE and searching for
> > "Javascript*" or "CSS*" and nothing relevant came up.
>
> Actually, if that was a while ago, that should have come up, as the
> first implementations had public static classes for that so that you
> could choose whether to use the static methods or not. That got
> refactored later on by Matej and possibly others.
>
> Anyway, the discussion whether this has been the best choice isn't
> relevant at this point. I might agree with you that maybe different
> classes would have been a better idea (though atm I feel neutral on
> the thing), but the fact is that we have this now and we're not gonna
> break the API at this stage.
>
>
> Eelco
>
> ---------------------------------------------------------------------
> 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 29, 2007 11:37 AM, Ryan Sonnek <ry...@gmail.com> wrote:
> I don't quite understand this...
> "Instead of having to know a ton of classes, you just have to know this one."
>
> I really struggled with wicket originally when trying to do these
> header contributions.  I was using the IDE and searching for
> "Javascript*" or "CSS*" and nothing relevant came up.

Actually, if that was a while ago, that should have come up, as the
first implementations had public static classes for that so that you
could choose whether to use the static methods or not. That got
refactored later on by Matej and possibly others.

Anyway, the discussion whether this has been the best choice isn't
relevant at this point. I might agree with you that maybe different
classes would have been a better idea (though atm I feel neutral on
the thing), but the fact is that we have this now and we're not gonna
break the API at this stage.

Eelco

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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Alex Objelean <al...@isdc.ro>.
I think William is not talking about when js is executed, but how it is
included - in the bottom of the body tag.

Alex.


igor.vaynberg wrote:
> 
> you can already sorta do this
> 
> our iheadercontributor's iheaderresponse has
> renderOnDomReadyJavascript and renderOnLoadJavascript so you can put
> javascript that will be executed after page loads..
> 
> -igor
> 
> 
> On Nov 30, 2007 4:29 AM, William Hoover <wh...@nemours.org> wrote:
>> While your on the subject... shouldn't there be a forJavaScript that is
>> external from the HeaderContributor that does a more intelligent
>> insertion of the script farther down the dom tree to increase performance
>> (http://developer.yahoo.com/performance/rules.html#js_bottom)?
>>
>>
>> -----Original Message-----
>> From: Johan Compagner [mailto:jcompagner@gmail.com]
>> Sent: Friday, November 30, 2007 2:35 AM
>> To: users@wicket.apache.org
>> Subject: Re: [RFE] HeaderContributor.forFavicon(Reference)
>>
>>
>> I dont think there is any thing magical at the headerresponse if you
>> ask me. Do remeber that when doing header responses you have to
>> override that method on component anyway and then you are getting that
>> headerresponse param.
>>
>> But maybe i dont see the complete picture here what you are
>> describing. So how does XxxxResource.headerContribution() method look
>> like? What params does it get? How does it get the right response
>> object? (it has to be an implementation of (Ajax)HeaderResponse)
>>
>> Johan
>>
>> On 11/29/07, Ryan Sonnek <ry...@gmail.com> wrote:
>> > I don't quite understand this...
>> > "Instead of having to know a ton of classes, you just have to know this
>> > one."
>> >
>> > I really struggled with wicket originally when trying to do these
>> > header contributions.  I was using the IDE and searching for
>> > "Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
>> > to dig through tutorials to find out how to do this.  IMO, it would be
>> > much more straightforward for users to use a static method on the
>> > related class instead of knowing about the "magical" HeaderContributor
>> > object...
>> >
>> > Just my two cents...
>> >
>> > ---------------------------------------------------------------------
>> > 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14103968
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Igor Vaynberg <ig...@gmail.com>.
you can already sorta do this

our iheadercontributor's iheaderresponse has
renderOnDomReadyJavascript and renderOnLoadJavascript so you can put
javascript that will be executed after page loads..

-igor


On Nov 30, 2007 4:29 AM, William Hoover <wh...@nemours.org> wrote:
> While your on the subject... shouldn't there be a forJavaScript that is external from the HeaderContributor that does a more intelligent insertion of the script farther down the dom tree to increase performance (http://developer.yahoo.com/performance/rules.html#js_bottom)?
>
>
> -----Original Message-----
> From: Johan Compagner [mailto:jcompagner@gmail.com]
> Sent: Friday, November 30, 2007 2:35 AM
> To: users@wicket.apache.org
> Subject: Re: [RFE] HeaderContributor.forFavicon(Reference)
>
>
> I dont think there is any thing magical at the headerresponse if you
> ask me. Do remeber that when doing header responses you have to
> override that method on component anyway and then you are getting that
> headerresponse param.
>
> But maybe i dont see the complete picture here what you are
> describing. So how does XxxxResource.headerContribution() method look
> like? What params does it get? How does it get the right response
> object? (it has to be an implementation of (Ajax)HeaderResponse)
>
> Johan
>
> On 11/29/07, Ryan Sonnek <ry...@gmail.com> wrote:
> > I don't quite understand this...
> > "Instead of having to know a ton of classes, you just have to know this
> > one."
> >
> > I really struggled with wicket originally when trying to do these
> > header contributions.  I was using the IDE and searching for
> > "Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
> > to dig through tutorials to find out how to do this.  IMO, it would be
> > much more straightforward for users to use a static method on the
> > related class instead of knowing about the "magical" HeaderContributor
> > object...
> >
> > Just my two cents...
> >
> > ---------------------------------------------------------------------
> > 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by William Hoover <wh...@nemours.org>.
done... http://issues.apache.org/jira/browse/WICKET-1203

-----Original Message-----
From: Eelco Hillenius [mailto:eelco.hillenius@gmail.com]
Sent: Friday, November 30, 2007 8:32 PM
To: users@wicket.apache.org
Subject: Re: [RFE] HeaderContributor.forFavicon(Reference)


On Nov 30, 2007 4:29 AM, William Hoover <wh...@nemours.org> wrote:
> While your on the subject... shouldn't there be a forJavaScript that is external from the HeaderContributor that does a more intelligent insertion of the script farther down the dom tree to increase performance (http://developer.yahoo.com/performance/rules.html#js_bottom)?

I'm not sure what the catches are there. If you could open up a
feature request for, we can investigate it for 1.4.

Eelco

---------------------------------------------------------------------
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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 30, 2007 4:29 AM, William Hoover <wh...@nemours.org> wrote:
> While your on the subject... shouldn't there be a forJavaScript that is external from the HeaderContributor that does a more intelligent insertion of the script farther down the dom tree to increase performance (http://developer.yahoo.com/performance/rules.html#js_bottom)?

I'm not sure what the catches are there. If you could open up a
feature request for, we can investigate it for 1.4.

Eelco

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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Ryan Sonnek <ry...@gmail.com>.
See the Wicket FeedResource in wicketstuff for an example.  I'm not
saying it's "perfect", but I *do* think it's a step in the right
direction.
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-rome/src/main/java/org/wicketstuff/rome/FeedResource.java


On Nov 30, 2007 2:35 AM, Johan Compagner <jc...@gmail.com> wrote:
> I dont think there is any thing magical at the headerresponse if you
> ask me. Do remeber that when doing header responses you have to
> override that method on component anyway and then you are getting that
> headerresponse param.
>
> But maybe i dont see the complete picture here what you are
> describing. So how does XxxxResource.headerContribution() method look
> like? What params does it get? How does it get the right response
> object? (it has to be an implementation of (Ajax)HeaderResponse)
>
> Johan
>
>
> On 11/29/07, Ryan Sonnek <ry...@gmail.com> wrote:
> > I don't quite understand this...
> > "Instead of having to know a ton of classes, you just have to know this
> > one."
> >
> > I really struggled with wicket originally when trying to do these
> > header contributions.  I was using the IDE and searching for
> > "Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
> > to dig through tutorials to find out how to do this.  IMO, it would be
> > much more straightforward for users to use a static method on the
> > related class instead of knowing about the "magical" HeaderContributor
> > object...
> >
> > Just my two cents...
> >
>
> > ---------------------------------------------------------------------
> > 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by William Hoover <wh...@nemours.org>.
While your on the subject... shouldn't there be a forJavaScript that is external from the HeaderContributor that does a more intelligent insertion of the script farther down the dom tree to increase performance (http://developer.yahoo.com/performance/rules.html#js_bottom)?

-----Original Message-----
From: Johan Compagner [mailto:jcompagner@gmail.com]
Sent: Friday, November 30, 2007 2:35 AM
To: users@wicket.apache.org
Subject: Re: [RFE] HeaderContributor.forFavicon(Reference)


I dont think there is any thing magical at the headerresponse if you
ask me. Do remeber that when doing header responses you have to
override that method on component anyway and then you are getting that
headerresponse param.

But maybe i dont see the complete picture here what you are
describing. So how does XxxxResource.headerContribution() method look
like? What params does it get? How does it get the right response
object? (it has to be an implementation of (Ajax)HeaderResponse)

Johan

On 11/29/07, Ryan Sonnek <ry...@gmail.com> wrote:
> I don't quite understand this...
> "Instead of having to know a ton of classes, you just have to know this
> one."
>
> I really struggled with wicket originally when trying to do these
> header contributions.  I was using the IDE and searching for
> "Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
> to dig through tutorials to find out how to do this.  IMO, it would be
> much more straightforward for users to use a static method on the
> related class instead of knowing about the "magical" HeaderContributor
> object...
>
> Just my two cents...
>
> ---------------------------------------------------------------------
> 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Johan Compagner <jc...@gmail.com>.
I dont think there is any thing magical at the headerresponse if you
ask me. Do remeber that when doing header responses you have to
override that method on component anyway and then you are getting that
headerresponse param.

But maybe i dont see the complete picture here what you are
describing. So how does XxxxResource.headerContribution() method look
like? What params does it get? How does it get the right response
object? (it has to be an implementation of (Ajax)HeaderResponse)

Johan

On 11/29/07, Ryan Sonnek <ry...@gmail.com> wrote:
> I don't quite understand this...
> "Instead of having to know a ton of classes, you just have to know this
> one."
>
> I really struggled with wicket originally when trying to do these
> header contributions.  I was using the IDE and searching for
> "Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
> to dig through tutorials to find out how to do this.  IMO, it would be
> much more straightforward for users to use a static method on the
> related class instead of knowing about the "magical" HeaderContributor
> object...
>
> Just my two cents...
>
> ---------------------------------------------------------------------
> 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Ryan Sonnek <ry...@gmail.com>.
I don't quite understand this...
"Instead of having to know a ton of classes, you just have to know this one."

I really struggled with wicket originally when trying to do these
header contributions.  I was using the IDE and searching for
"Javascript*" or "CSS*" and nothing relevant came up.  Instead, I had
to dig through tutorials to find out how to do this.  IMO, it would be
much more straightforward for users to use a static method on the
related class instead of knowing about the "magical" HeaderContributor
object...

Just my two cents...

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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Eelco Hillenius <ee...@gmail.com>.
> I'm very much against the current "static util" pattern that the
> HeaderContributor object is headed.  I would much rather have this
> behavior moved into the appropriate class (ex:
> JavascriptResource.headerContribution()) instead of bloating
> HeaderContributor.  this is how i designed the wicket FeedResource.
> http://www.jroller.com/wireframe/entry/wicket_feedresource

I don't mind the factory pattern here (I started that code, so no
surprise there). Instead of having to know a ton of classes, you just
have to know this one. Also, we already have it, so extending it is
not a big problem.

I would be fine with adding this one as well if others don't object.

Eelco

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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Ryan Sonnek <ry...@gmail.com>.
-1 for this.

I'm very much against the current "static util" pattern that the
HeaderContributor object is headed.  I would much rather have this
behavior moved into the appropriate class (ex:
JavascriptResource.headerContribution()) instead of bloating
HeaderContributor.  this is how i designed the wicket FeedResource.
http://www.jroller.com/wireframe/entry/wicket_feedresource

On Nov 29, 2007 8:00 AM, Alex Objelean <al...@isdc.ro> wrote:
>
> Also this can be done extending PackagedResourceReference, but this is not
> the point.
> I found myself copying the same code from one project to another, just
> because wicket core does not provide a common way to add favicons. I think,
> that since HeaderContributor has already: forCss & forJavaScript, it would
> not be a big deal to add also forFavicon method.
>
> Regards,
> Alex.
>
>
>
> Matej Knopp-2 wrote:
> >
> > You can do this by directly using IHeaderResponse.renderString().
> > e.g. make a custom behavior that implements IHeaderContributor and
> > call this from it's renderHead.
> > I don't think we need this in HeaderContributor itself. But others
> > might have different opinion.
> >
> > -Matej
> >
> > On Nov 29, 2007 11:08 AM, Alex Objelean <al...@isdc.ro>
> > wrote:
> >>
> >> I find it very useful to be able to add a favicon reference easily, using
> >> HeaderContributor. What do you think?
> >>
> >>
> >> Note:
> >> Favicon is a link with the following attributes: rel: "shortcut icon" &
> >> type: "image/x-icon".
> >> For example: <link rel="shortcut icon" type="image/x-icon"
> >> href="/resources/....favicon.ico"></link>
> >>
> >> Alex.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14022731
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14025400
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Alex Objelean <al...@isdc.ro>.
Also this can be done extending PackagedResourceReference, but this is not
the point. 
I found myself copying the same code from one project to another, just
because wicket core does not provide a common way to add favicons. I think,
that since HeaderContributor has already: forCss & forJavaScript, it would
not be a big deal to add also forFavicon method. 

Regards,
Alex.


Matej Knopp-2 wrote:
> 
> You can do this by directly using IHeaderResponse.renderString().
> e.g. make a custom behavior that implements IHeaderContributor and
> call this from it's renderHead.
> I don't think we need this in HeaderContributor itself. But others
> might have different opinion.
> 
> -Matej
> 
> On Nov 29, 2007 11:08 AM, Alex Objelean <al...@isdc.ro>
> wrote:
>>
>> I find it very useful to be able to add a favicon reference easily, using
>> HeaderContributor. What do you think?
>>
>>
>> Note:
>> Favicon is a link with the following attributes: rel: "shortcut icon" &
>> type: "image/x-icon".
>> For example: <link rel="shortcut icon" type="image/x-icon"
>> href="/resources/....favicon.ico"></link>
>>
>> Alex.
>> --
>> View this message in context:
>> http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14022731
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14025400
Sent from the Wicket - User mailing list archive at Nabble.com.


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


Re: [RFE] HeaderContributor.forFavicon(Reference)

Posted by Matej Knopp <ma...@gmail.com>.
You can do this by directly using IHeaderResponse.renderString().
e.g. make a custom behavior that implements IHeaderContributor and
call this from it's renderHead.
I don't think we need this in HeaderContributor itself. But others
might have different opinion.

-Matej

On Nov 29, 2007 11:08 AM, Alex Objelean <al...@isdc.ro> wrote:
>
> I find it very useful to be able to add a favicon reference easily, using
> HeaderContributor. What do you think?
>
>
> Note:
> Favicon is a link with the following attributes: rel: "shortcut icon" &
> type: "image/x-icon".
> For example: <link rel="shortcut icon" type="image/x-icon"
> href="/resources/....favicon.ico"></link>
>
> Alex.
> --
> View this message in context: http://www.nabble.com/-RFE--HeaderContributor.forFavicon%28Reference%29-tf4896178.html#a14022731
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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