Tuesday 1 February 2011

Favicon Icon In ADF

To create Favicon Icon for Your ADF application without changing context root, you can follow the following steps.

Place the favicon.ico in your Webcontent root.

For me it is like FaviconViewController\public_html

Refresh Your ViewController project it will show favicon.ico in WebContent section as shown in picture.


Now create one jspx page that will use the favicon.ico



Right Click the af:document in structure window and enable the metaContainer facet as shown in the picture.



Inside metaContainer facet create one af:outputText as shown in picture.







Put the value of the outputText
as
<link rel='SHORTCUT ICON' href='#{facesContext.externalContext.requestContextPath}/favicon.ico'/>




set the escape property of the outputText to false.



Now run your page you will be able to see the favicon in supported browsers.



Please comment in comment section for any queries or suggestion.


Favicon can be added in other ways also..

5 comments:

  1. Funciona!!

    Muchas Gracias

    ReplyDelete
  2. Is there a way to add favicon to page template?

    ReplyDelete
  3. Not a bit of usefulness. It's extremely easy to add favicon for a single page. If you described how to add favicon for a huge project with a lot of page templates that would be sweet...

    ReplyDelete
  4. Is there any way to do it in page template? There is no af:document tag there =/

    ReplyDelete