Current .XHTML code and the css file has been linked with :
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:outputStylesheet library="default" name="css/style.css" />
<p:panelGrid styleClass="ui-box" >
<h:form>
<p:row>
<p:column style="padding-left:150px;padding-right:50px;">
<p:graphicImage url="/resources/images/logo.jpg"/>
</p:column>
<p:growl id="growl" life="2000" />
<p:column style="font-weight: bold;">
<p:commandLink id="ajax" update="growl" actionListener="#{buttonView.buttonAction}">
<h:outputText value="Log in" />
</p:commandLink>
</p:column>
<p:column style="font-weight: bold;">
<p:commandLink id="nonAjax" actionListener="#{buttonView.buttonAction}" ajax="false">
<h:outputText value="Non-Ajax Submit" />
</p:commandLink>
</p:column>
<p:column style="font-weight: bold;">
<p:commandButton value="Become Speaker" id="ajax2" update="growl" actionListener="#{buttonView.buttonAction}" styleClass="ui-priority-primary" />
</p:column>
</p:row>
</h:form>
</p:panelGrid>
</h:body>
</html>
Current CSS code (style.css):
@CHARSET "ISO-8859-1";
.ui-box{
border-color: red;
}
And web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>p01</display-name>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<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>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
</web-app>
I am biginner... I would appreciate if someone can help me for style my primefaces elements.
thanks in advance.
Duplicated ??
I don't think so.I do what the suggestions answers told us but they are not work with me. Help me please.