FINALLY got the theme selection to work (THEY LIED!!!)

This commit is contained in:
Tim Holloway 2022-01-05 23:36:03 -05:00
parent 94474e974e
commit 8818969564
4 changed files with 16 additions and 9 deletions

View File

@ -8,7 +8,7 @@ components that it depended on and unfortunately he has not had the time to
repair the the app after recent upgrades (including Python 3 and Gnome library) changes broke it.
Java is not only "write once/run anywhere", but also was designed for an environment
where changes should not break esisting Java apps. Hence the port. It was easier
where changes should not break existing Java apps. Hence the port. It was easier
than trying to learn all the new external resources used by the Python version,
make detailed repairs and wait for it to break again.
@ -21,7 +21,7 @@ shopping categories. The ultimate intent is to provide all functions that the or
You must have Maven installed on your system to build a copy of the app
from scratch. You must have Java 11 or later installed on your
system to run Maven and to runn the app.
system to run Maven and to run the app.
This project can be built on the command line using the
``mvn clean install`` command if you have Maven installed in

View File

@ -1,6 +1,11 @@
joinfaces.jsf.project-stage=development
joinfaces.primefaces.theme=bluesky
#joinfaces.jsf.project-stage=development
# They lied. This doesn't work:
joinfaces.primefaces.theme=cupertino
joinfaces.jsf.webapp-resources-directory=/resources
# This works. Note that ONLY THE FIRST theme set will work unless
# you delete the old primefaces.THEME from ServletContext
server.servlet.context-parameters.primefaces.THEME=omega
spring.thymeleaf.enabled=false
server.error.whitelabel.enabled=false

View File

@ -3,6 +3,8 @@ package com.mousetech.gourmetj;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.primefaces.application.resource.PrimeResourceHandler;
import org.primefaces.renderkit.HeadRenderer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
@ -31,8 +33,11 @@ public class SpringPrimeFacesApplication {
@Override
public void onStartup(ServletContext servletContext)
throws ServletException {
servletContext.setInitParameter(
"primefaces.THEME", "afternoon");
/* Note that we cannot set theme here since it was
* already set earlier. Default value is "aristo".
*/
// servletContext.setInitParameter(
// "primefaces.THEME", "bluesky");
servletContext.setInitParameter(
"javax.faces.FACELETS_SKIP_COMMENTS",
"true");

View File

@ -6,6 +6,3 @@ spring:
ddl-auto: none
database-platform: org.sqlite.hibernate.dialect.SQLiteDialect
jsf:
primefaces:
theme: bluesky