You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Eyal Golan <eg...@gmail.com> on 2008/11/05 08:43:34 UTC

adding favicon using behavior

Hi,
We have a behavior that is added to our main page (we use markup
inheritance).
In the behavior we add CSS links (and JS).
We want to add a favicon as well.
Here's what we did:
response.getResponse().write("<link rel=\"SHORTCUT ICON\"
href=\"/resources/favicon.ico\"/>\n");

Is this the best way?

Thanks

-- 
Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

Re: adding favicon using behavior

Posted by Eyal Golan <eg...@gmail.com>.
>
> do you not use an ide?

Yes I do. eclipse...
A new developer in our staff added this piece of code (
response.getResponse().write("<link rel=\"SHORTCUT ICON\" ...)
And I thought that there's something better.

>
>
> -igor
>
> >
> > On Wed, Nov 5, 2008 at 10:44 AM, Nino Saturnino Martinez Vazquez Wael <
> > nino.martinez@jayway.dk> wrote:
> >
> >> Yup like so, just change it to link instead of meta:
> >>
> >> public class SiteAHeader extends AbstractBehavior implements
> >>       IHeaderContributor {
> >>
> >>   public void renderHead(IHeaderResponse response) {
> >>
> >>       response
> >>               .renderString("<meta name=\"description\"
> >> content=\"description\" />");
> >>
> >>   }
> >>
> >> }
> >>
> >>
> >> Igor Vaynberg wrote:
> >>
> >>> use iheadercontributor
> >>>
> >>> -igor
> >>>
> >>> On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <eg...@gmail.com>
> wrote:
> >>>
> >>>
> >>>> Hi,
> >>>> We have a behavior that is added to our main page (we use markup
> >>>> inheritance).
> >>>> In the behavior we add CSS links (and JS).
> >>>> We want to add a favicon as well.
> >>>> Here's what we did:
> >>>> response.getResponse().write("<link rel=\"SHORTCUT ICON\"
> >>>> href=\"/resources/favicon.ico\"/>\n");
> >>>>
> >>>> Is this the best way?
> >>>>
> >>>> Thanks
> >>>>
> >>>> --
> >>>> Eyal Golan
> >>>> egolan74@gmail.com
> >>>>
> >>>> Visit: http://jvdrums.sourceforge.net/
> >>>> LinkedIn: http://www.linkedin.com/in/egolan74
> >>>>
> >>>> P  Save a tree. Please don't print this e-mail unless it's really
> >>>> necessary
> >>>>
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> -Wicket for love
> >>
> >> Nino Martinez Wael
> >> Java Specialist @ Jayway DK
> >> http://www.jayway.dk
> >> +45 2936 7684
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Eyal Golan
> > egolan74@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: adding favicon using behavior

Posted by Igor Vaynberg <ig...@gmail.com>.
On Wed, Nov 5, 2008 at 1:06 AM, Eyal Golan <eg...@gmail.com> wrote:
> 10x :)

omfg its spreading

> Igor, actually this is what I am using (an AbstractBehavior).
> The 'renderString' is what I was looking for.

do you not use an ide?

-igor

>
> On Wed, Nov 5, 2008 at 10:44 AM, Nino Saturnino Martinez Vazquez Wael <
> nino.martinez@jayway.dk> wrote:
>
>> Yup like so, just change it to link instead of meta:
>>
>> public class SiteAHeader extends AbstractBehavior implements
>>       IHeaderContributor {
>>
>>   public void renderHead(IHeaderResponse response) {
>>
>>       response
>>               .renderString("<meta name=\"description\"
>> content=\"description\" />");
>>
>>   }
>>
>> }
>>
>>
>> Igor Vaynberg wrote:
>>
>>> use iheadercontributor
>>>
>>> -igor
>>>
>>> On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <eg...@gmail.com> wrote:
>>>
>>>
>>>> Hi,
>>>> We have a behavior that is added to our main page (we use markup
>>>> inheritance).
>>>> In the behavior we add CSS links (and JS).
>>>> We want to add a favicon as well.
>>>> Here's what we did:
>>>> response.getResponse().write("<link rel=\"SHORTCUT ICON\"
>>>> href=\"/resources/favicon.ico\"/>\n");
>>>>
>>>> Is this the best way?
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> Eyal Golan
>>>> egolan74@gmail.com
>>>>
>>>> Visit: http://jvdrums.sourceforge.net/
>>>> LinkedIn: http://www.linkedin.com/in/egolan74
>>>>
>>>> P  Save a tree. Please don't print this e-mail unless it's really
>>>> necessary
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>

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


Re: adding favicon using behavior

Posted by Eyal Golan <eg...@gmail.com>.
10x :)
Igor, actually this is what I am using (an AbstractBehavior).
The 'renderString' is what I was looking for.

On Wed, Nov 5, 2008 at 10:44 AM, Nino Saturnino Martinez Vazquez Wael <
nino.martinez@jayway.dk> wrote:

> Yup like so, just change it to link instead of meta:
>
> public class SiteAHeader extends AbstractBehavior implements
>       IHeaderContributor {
>
>   public void renderHead(IHeaderResponse response) {
>
>       response
>               .renderString("<meta name=\"description\"
> content=\"description\" />");
>
>   }
>
> }
>
>
> Igor Vaynberg wrote:
>
>> use iheadercontributor
>>
>> -igor
>>
>> On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <eg...@gmail.com> wrote:
>>
>>
>>> Hi,
>>> We have a behavior that is added to our main page (we use markup
>>> inheritance).
>>> In the behavior we add CSS links (and JS).
>>> We want to add a favicon as well.
>>> Here's what we did:
>>> response.getResponse().write("<link rel=\"SHORTCUT ICON\"
>>> href=\"/resources/favicon.ico\"/>\n");
>>>
>>> Is this the best way?
>>>
>>> Thanks
>>>
>>> --
>>> Eyal Golan
>>> egolan74@gmail.com
>>>
>>> Visit: http://jvdrums.sourceforge.net/
>>> LinkedIn: http://www.linkedin.com/in/egolan74
>>>
>>> P  Save a tree. Please don't print this e-mail unless it's really
>>> necessary
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Eyal Golan
egolan74@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary

Re: adding favicon using behavior

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yup like so, just change it to link instead of meta:

public class SiteAHeader extends AbstractBehavior implements
        IHeaderContributor {

    public void renderHead(IHeaderResponse response) {

        response
                .renderString("<meta name=\"description\" 
content=\"description\" />");
    }

}


Igor Vaynberg wrote:
> use iheadercontributor
>
> -igor
>
> On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <eg...@gmail.com> wrote:
>   
>> Hi,
>> We have a behavior that is added to our main page (we use markup
>> inheritance).
>> In the behavior we add CSS links (and JS).
>> We want to add a favicon as well.
>> Here's what we did:
>> response.getResponse().write("<link rel=\"SHORTCUT ICON\"
>> href=\"/resources/favicon.ico\"/>\n");
>>
>> Is this the best way?
>>
>> Thanks
>>
>> --
>> Eyal Golan
>> egolan74@gmail.com
>>
>> Visit: http://jvdrums.sourceforge.net/
>> LinkedIn: http://www.linkedin.com/in/egolan74
>>
>> P  Save a tree. Please don't print this e-mail unless it's really necessary
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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


Re: adding favicon using behavior

Posted by Igor Vaynberg <ig...@gmail.com>.
use iheadercontributor

-igor

On Tue, Nov 4, 2008 at 11:43 PM, Eyal Golan <eg...@gmail.com> wrote:
> Hi,
> We have a behavior that is added to our main page (we use markup
> inheritance).
> In the behavior we add CSS links (and JS).
> We want to add a favicon as well.
> Here's what we did:
> response.getResponse().write("<link rel=\"SHORTCUT ICON\"
> href=\"/resources/favicon.ico\"/>\n");
>
> Is this the best way?
>
> Thanks
>
> --
> Eyal Golan
> egolan74@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>

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


Re: adding favicon using behavior

Posted by "Srikanth.NT" <nt...@gmail.com>.
Here is a simple example to add favicon. 

http://ntsrikanth.blogspot.com/2008/11/add-favicon-to-your-page_05.html

-----
http://ntsrikanth.blogspot.com/
-- 
View this message in context: http://www.nabble.com/adding-favicon-using-behavior-tp20337307p20410246.html
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