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

  • PrimeFaces Theme Development
  • Andy Bailey Sudheer Jonna
  • 363字
  • 2021-07-09 21:12:25

Summary

We have now come to the end of the chapter and achieved a lot. While we pat ourselves on the shoulder or drink a well-earned cup of coffee/tea, let us review what we have done up to now.

We had a brief look at the difference between standard JSF and PrimeFaces components in terms of the HTML that is generated for them. One of the issues with standard JSF components is the lack of accessibility support. By default, PrimeFaces addresses this issue.

We added extra themes to the project and then set the appropriate context parameter in web.xml to use one of them instead of the default aristo theme. We then added code that displays the name of the current theme being used. We created two JavaBeans, which allow us to set and change the theme for each user independent of the application settings as well as provide a list of themes that a user can choose from.

In order to make things easier when adding content to the project, we created a Facelets Template, which can be used to add standard content to each of the pages, that is, a Facelets Template Client of the template. We also displayed the currently chosen theme. To top it all, we added a ThemeSwitcher component to it as well.

We then created the home page for the project as a Facelets Template Client. We also created a mini showcase for PrimeFaces components and linked this page to the template.

In the mini showcase, we also added buttons, which enabled us to change themes without using the ThemeSwitcher.

What we didn't do is change the difference.xhtml page to use chaptersTemplate. This is left as an exercise for you.

We touched on how we read and write to Bean properties using EL expressions, the way EL shields us from the complexity of whether to call a getter property method or a setter property method, and how we can explicitly set a property value.

All in all, we achieved a lot. Well done!

In the next chapter, we will look at the frameworks used to develop and use a PrimeFaces theme—jQuery, jQuery UI, and ThemeRoller.

主站蜘蛛池模板: 衡水市| 留坝县| 台中县| 梅河口市| 吴江市| 洪泽县| 嘉峪关市| 永宁县| 临安市| 和林格尔县| 武宣县| 铁岭县| 巨鹿县| 安义县| 称多县| 内黄县| 武定县| 突泉县| 静宁县| 六安市| 阳东县| 剑河县| 健康| 毕节市| 广平县| 常山县| 玉山县| 新化县| 望城县| 孝昌县| 罗山县| 巴南区| 治县。| 新干县| 东丽区| 千阳县| 万盛区| 陈巴尔虎旗| 治县。| 永年县| 安多县|