I want to disable theme style for some Primefaces components. I tried this configuration:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>none</param-value>
</context-param>
But I can't find any solution. Can you propose some alternative?
Related
when applying the theme this has no color, it is white on all the pages of the project java ee
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>admin</param-value>
</context-param>
those two pages the color of the theme is white
https://imgur.com/a/4vLpteh
https://imgur.com/a/13O2ET9
add to the project admin-theme-1.0.0-RC15 and primefaces-6.2 but it does not work completely, what do I have to do to make this theme work full?
Is it possible to run html and xhtml on the same page? I am using jsf and need to integrate it in a template.
if you really need to give them the .html extension, then you'd need to change the default suffix to .html as well. Add the following entry to web.xml to achieve that:
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.html</param-value>
</context-param>
I'm new to primefaces.I want to set up a theme that i dowloaded from the primefaces site. I added this code to web.xml
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>casablanca</param-value>
</context-param>
and i put the casablanca.jar in the /web-inf/ directory but still doesn't work
I'm developing a portlet project with primefaces and I want to change the default theme.
I made a custom theme with jquery themeRoller and I made a jar file containing the theme as explained in the official documentation.
The problem is the css resource is not found :
Unable to find or serve resource, myTheme.css, from library, primefaces-myTheme.
NB: in web.xml I put:
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>myTheme</param-value>
</context-param>
Help please
Have you put your jar file in the 'lib' folder? Have you followed the theme directory structure properly? Check out this link.
http://chawi3.com/2012/05/18/add-custom-theme-primefaces/
I have a Java EE application that I am building with Spring and Maven. It has the usual project structure. Here is a bit of the hierarchy.
MyApplication
src
main
webapp
WEB-INF
layout
header.jsp
styles
main.css
I want to include that CSS file in my JSP. I have the following tag in place.
<c:url var="styleSheetUrl" value="/styles/main.css" />
<link rel="stylesheet" href="${styleSheetUrl}">
When I deploy the application, the CSS page isn't being located. When I view the page source, the href is /MyApplication/styles/main.css. Looking inside the WAR, there is a /styles/main.css. However, I get a 404 when I try to access the CSS file directly in the browser.
I discovered that the reason for the issue was the Dispatcher Servlet mapping. The mapping looks as follows.
<servlet-mapping>
<servlet-name>Spring MVC Dispatcher Servlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
I imagine the Dispatcher Servlet doesn't know how to handle the CSS request. What is the best way to handle this issue? I would rather not have to change all of my request mappings.
You need to configure Spring to handle the static resources (CSS, JS, images) separately from servlet requests to your app. To do this, configure your Spring config to map requests to static files via a separate top level directory (e.g. "static"):
<!-- Where to load static resources (css, js, images) -->
<mvc:resources mapping="/static/**" location="/" />
Then change your JSP to use the path /static/styles/main.css.
Note, convention dictates you name your "styles" directory to "css".
Add the following in web.xml
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
and use the following to include your css
<link rel="stylesheet" href="styles/main.css">