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

version2
Tim Holloway 2 years ago
parent 94474e974e
commit 8818969564
  1. 4
      README.md
  2. 9
      application.properties
  3. 9
      src/main/java/com/mousetech/gourmetj/SpringPrimeFacesApplication.java
  4. 3
      src/main/resources/META-INF/resources/application.yml

@ -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. 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 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, than trying to learn all the new external resources used by the Python version,
make detailed repairs and wait for it to break again. 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 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 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 This project can be built on the command line using the
``mvn clean install`` command if you have Maven installed in ``mvn clean install`` command if you have Maven installed in

@ -1,6 +1,11 @@
joinfaces.jsf.project-stage=development #joinfaces.jsf.project-stage=development
joinfaces.primefaces.theme=bluesky # 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 spring.thymeleaf.enabled=false
server.error.whitelabel.enabled=false server.error.whitelabel.enabled=false

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

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

Loading…
Cancel
Save