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

  • 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.

主站蜘蛛池模板: 黑山县| 南澳县| 德兴市| 兴海县| 岳西县| 桂阳县| 柘荣县| 黄梅县| 昌宁县| 邛崃市| 德格县| 博白县| 崇义县| 岳池县| 金溪县| 平度市| 临安市| 南城县| 中阳县| 措美县| 响水县| 梅河口市| 汉寿县| 永寿县| 昌江| 平度市| 禹城市| 罗平县| 南城县| 饶平县| 云南省| 竹北市| 项城市| 郎溪县| 民县| 土默特左旗| 临沭县| 黄浦区| 客服| 乐都县| 麦盖提县|