Hello,
I bought the sapphire theme .. I followed the guide to: https://www.primefaces.org/sapphire/docs.xhtml
I hope I have taken all the necessary steps ... but when I run the test webbapp, I get the errors:
com.sun.faces.application.resource.ResourceHandlerImpl.logMissingResource JSF1064: Unable to find or serve resource, theme.css, from library, primefaces-primefaces-sapphire-blue.
18-Apr-2019 12:11:39.271 GRAVE [http-nio-8080-exec-10] com.sun.faces.application.view.FaceletViewHandlingStrategy.handleRenderException Error Rendering View[/index.xhtml]
javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-primefaces-sapphire-blue" library
at org.primefaces.renderkit.HeadRenderer.encodeCSS(HeadRenderer.java:150)
...
....
com.sun.faces.context.ExceptionHandlerImpl.log JSF1073: javax.faces.FacesException caught during processing of RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=Error loading css, cannot find "theme.css" resource of "primefaces-primefaces-sapphire-blue" library
18-Apr-2019 12:11:39.322 1100 [http-nio-8080-exec-10] com.sun.faces.context.ExceptionHandlerImpl.log Error loading css, cannot find "theme.css" resource of "primefaces-primefaces-sapphire-blue" library
javax.faces.FacesException: Error loading css, cannot find "theme.css" resource of "primefaces-primefaces-sapphire-blue" library
...
etc.. etc...
this is a Netbeans screenshot where I text my webapp:
what am I doing wrong?
Theme Sapphire Installation
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Please use in web.xml;
Best Regards,
Code: Select all
sapphire-blue // instead of primefaces-sapphire-blue
Github Profile: https://github.com/mertsincan
thank you... now the error has disappeared ..
i open the url : http://localhost:8080/PrimefacesThemeTest/login.xhtml
but the page is incorrectly rendered .. the error is:
[http-nio-8080-exec-1] com.sun.faces.application.resource.ResourceHandlerImpl.logMissingResource JSF1064: Unable to find or serve resource, css/layout-.css, from library, sapphire-layout.
the web.xml is now :
i open the url : http://localhost:8080/PrimefacesThemeTest/login.xhtml
but the page is incorrectly rendered .. the error is:
[http-nio-8080-exec-1] com.sun.faces.application.resource.ResourceHandlerImpl.logMissingResource JSF1064: Unable to find or serve resource, css/layout-.css, from library, sapphire-layout.
the web.xml is now :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>primefaces.LEGACY_WIDGET_NAMESPACE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>sapphire-blue</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
<url-pattern>*.jsf</url-pattern>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
solved.. missing Guest Preferences bean..
the xhtml pages refer to it..
so i created the package org.primefaces.sapphire.view and copied it from the sources of the sapphire zip
(maybe it's just my case.. but it is a good idea to update the docs... .maybe..)
the xhtml pages refer to it..
so i created the package org.primefaces.sapphire.view and copied it from the sources of the sapphire zip
(maybe it's just my case.. but it is a good idea to update the docs... .maybe..)
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot for the update! If Guest Preferences is unnecessary for you, please remove it. We added it for loading dynamic resources. Please use;
Best Regards,
Code: Select all
Exp;
<h:outputStylesheet name="css/layout-blue.css" library="sapphire-layout" />
instead of
<h:outputStylesheet name="css/layout-#{guestPreferences.layout}.css" library="sapphire-layout" />
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
You're welcome!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests