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

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.

主站蜘蛛池模板: 漳州市| 神木县| 普兰店市| 大同县| 屏东县| 万源市| 红原县| 甘肃省| 孝义市| 寿阳县| 九龙坡区| 顺义区| 忻城县| 临沧市| 桓仁| 体育| 耿马| 清河县| 阜阳市| 临江市| 巴林左旗| 东兰县| 广丰县| 无棣县| 永安市| 灵丘县| 石渠县| 莆田市| 翁牛特旗| 鹤山市| 黄梅县| 木兰县| 云南省| 龙井市| 盐池县| 四子王旗| 瓦房店市| 咸丰县| 黄平县| 莱阳市| 莎车县|