California theme to maven project

Forum rules
Please note that response time for technical support is within 3-5 business days.
techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

20 Sep 2018, 07:44

Hi

I've purchased california theme, but couldn't able to setup with primefaces + springboot maven project.

here is mvn dependency

Code: Select all

<dependency>
		<groupId>org.primefaces.themes</groupId>
		<artifactId>california</artifactId>
		<version>1.0.1</version>
	</dependency>
here is repo I've added

Code: Select all

<repository>
  			<id>prime-repo</id>
  			<name>Prime Repo</name>
  			<url>http://repository.primefaces.org</url>
  		</repository>

getting following error when run - mvn spring-boot:run

Code: Select all

[ERROR] Failed to execute goal on project jsf-primefaces-spring-boot: Could not resolve dependencies for project com.codenotfound:jsf-primefaces-spring-boot:jar:0.0.1-SNAPSHOT: Could not find artifact org.primefaces.themes:california:jar:1.0.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

any help greatly appreciated.

Thanks.

techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

20 Sep 2018, 20:55

I've installed theme jar locally and able to build mvn project

Code: Select all

mvn install:install-file -Dfile=<path-to-file> -DgroupId=org.primefaces.themes -DartifactId=california -Dversion=1.0.1 -Dpackaging=jar
and modified application.yml to point to california theme

Code: Select all

jsf:
  primefaces: 
    theme: california

server:
  context-path: /example
  port: 9090
but getting below error whenever I access page -> http://localhost:9090/example/helloworld.xhtml

Code: Select all

15:29:04.131 [http-nio-9090-exec-1] ERROR o.a.c.c.C.[.[.[.[FacesServlet] - Servlet.service() for servlet [FacesServlet] in context with path [/example] threw exception [Error loading css, cannot find "theme.css" resource of "primefaces-california" library] with root cause
javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-california" library
	at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:149)
	at org.primefaces.renderkit.HeadRenderer.encodeBegin(HeadRenderer.java:81)
	at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:865)

huseyinT
Posts: 123
Joined: 27 Mar 2016, 13:05

24 Sep 2018, 12:37

You must generate CSS from the sass file.

In the documentation: http://primefaces.org/california/docs.xhtml

sass --update src/main/webapp/resources/ --sourcemap=none

techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

25 Sep 2018, 08:13

I've updated application.yml to

Code: Select all

jsf:
  primefaces: 
    theme: california-blue

server:
  context-path: /example
  port: 9090
now page coming up without any error but not getting same look and feel like california live version.
https://primefaces.org/california/dashboard.xhtml

Could you please help, how to setup jar version of california theme in spring boot apps as there will not be web.xml or WEB-INF folder.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

26 Sep 2018, 15:00

but not getting same look and feel like california live version.
Could you please attach a screenshot for us to replicate?
Could you please help, how to setup jar version of california theme in spring boot apps as there will not be web.xml or WEB-INF folder.
- Similar example; https://www.codenotfound.com/jsf-primef ... -boot.html

Best Regards,

techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

26 Sep 2018, 19:41

I've followed same example for California theme, but no luck. I just tried email composition panel only as I couldn't able to fix whole dashboard page and here is the link for screen shots.

https://drive.google.com/drive/folders/ ... 1M3HO-BPTk

One is form live version and other one is from my local, you can see the difference.

https://www.codenotfound.com/jsf-primef ... -boot.html

If we get same look and feel as live version, we are more happy to have enterprise license :)

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

27 Sep 2018, 10:03

You must also add layout files. Then provide the CSS using the SASS command. Theme.jar/Theme files only are for Components. Your issue is related to Layout css.

Exp, please add this code into your page;

Code: Select all

.dashboard .resolution-center .ui-inputfield {
    display: block;
    margin-top: 5px;
    margin-bottom: 15px;
}

techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

28 Sep 2018, 07:08

Finally I am able to get theme look. But still some styles are missing in data table (pagination and sort arrows are missing) added screen shot to google drive for your reference.

https://drive.google.com/drive/folders/ ... 1M3HO-BPTk

from california-layout-1.0.1.zip (which I downloaded), I converted resource/california-layout/css/layout-blue.scss to layout-blue.css and placed under my project resource/california-layout/css/layout-blue.css.

Could you please let me know what are all css and image files required to get California theme perfect with all widgets which are in live version? how to get them to make this work ?

Thanks for all your help.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Sep 2018, 08:42

Please add fontawesome in your project;

Code: Select all

<context-param>
        <param-name>primefaces.FONT_AWESOME</param-name>
        <param-value>true</param-value>
    </context-param>
Could you please let me know what are all css and image files required to get California theme perfect with all widgets which are in live version?
it is related to your project. Exp; If you want to use login.xhtml, please add login images.

Best Regards,

techgeek
Posts: 38
Joined: 07 Sep 2018, 20:37

28 Sep 2018, 10:28

My project is JSF with SpringBoot, so there is no web.xml to add font-awesome.

I've tried this https://stackoverflow.com/questions/497 ... primefaces but no luck.

Please help how to set this in springboot app.

Post Reply

Return to “California - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests