- 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.
- Docker and Kubernetes for Java Developers
- Mastering Zabbix(Second Edition)
- 圖解Java數(shù)據(jù)結(jié)構(gòu)與算法(微課視頻版)
- Unity 2020 Mobile Game Development
- Learning SAP Analytics Cloud
- 前端架構(gòu):從入門到微前端
- 假如C語言是我發(fā)明的:講給孩子聽的大師編程課
- JAVA程序設(shè)計實驗教程
- HTML5+CSS3 Web前端開發(fā)技術(shù)(第2版)
- 詳解MATLAB圖形繪制技術(shù)
- Instant Debian:Build a Web Server
- 區(qū)塊鏈項目開發(fā)指南
- Java并發(fā)編程:核心方法與框架
- 監(jiān)控的藝術(shù):云原生時代的監(jiān)控框架
- 你真的會寫代碼嗎