官术网_书友最值得收藏!

Chapter 2. Introducing PrimeFaces Themes

In order to be able to experience using JSF and the PrimeFaces library, we are going to continue our work from the last chapter and add to the PFThemes project. By the end of this chapter, you will have a deeper understanding of how even a simple JSF application can be greatly enriched by using PrimeFaces components in it. In particular, I will demonstrate how PrimeFaces provides a powerful themes framework.

In this chapter, we will cover the following topics:

  • The difference between standard JSF and PrimeFaces components
  • Adding additional themes to the project
  • Changing the theme used by the project
  • Displaying the name of the theme used by the project
  • Adding some classes to allow us to use the ThemeSwitcher component
  • Changing web.xml so that it supports dynamic themes
  • Creating a Facelets Template and adding a menu for navigation and a ThemeSwitcher to it
  • Creating a page that uses this template and adding some components to it
  • Adding a link to this page in the template
  • Displaying the name of the theme that is currently being used in the template
  • Adding some buttons to the page to switch themes without using the ThemeSwitcher
主站蜘蛛池模板: 夏邑县| 南皮县| 登封市| 肃北| 广河县| 望奎县| 德庆县| 融水| 禄劝| 永和县| 湖南省| 吉林市| 南城县| 仪陇县| 尖扎县| 江城| 泰宁县| 青冈县| 苏州市| 昌图县| 肥东县| 鄂托克前旗| 永昌县| 锡林浩特市| 宁都县| 安义县| 赞皇县| 石台县| 宣恩县| 柞水县| 如皋市| 林州市| 项城市| 乌兰察布市| 辉县市| 准格尔旗| 界首市| 晋中市| 靖远县| 汕头市| 巴彦淖尔市|