Questions on Themes

UI Components for JSF
Post Reply
merl.crepsjr
Posts: 15
Joined: 23 Sep 2013, 02:59

25 Jan 2015, 16:16

I am having trouble getting any theme to work.. Has to be something stupid i am doing any help is greatly appreciated.

Here is the web.xml

<?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>primefaces.THEME</param-name>
<param-value>afternoon</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.RenderKitId</param-name>
<param-value>PRIMEFACES_MOBILE</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>
</servlet-mapping>
<session-config>
<session-timeout>90</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/login.xhtml</welcome-file>
</welcome-file-list>
</web-app>


here is the xhtml
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:pm="http://primefaces.org/mobile">

<f:view renderKitId="PRIMEFACES_MOBILE" />

<h:head>
<f:facet name="postinit">
<style type="text/css">
.ui-header .ui-fullsize .ui-btn-inner, .ui-footer .ui-fullsize .ui-btn-inner{
font-size: 12px;
}
.ui-bar-a{
padding-bottom: 5px;
border-top-width: 5px;
}
</style>
</f:facet >
</h:head>


<pm:page id="first" >
<ui:include src="mobileheader.xhtml" />
<pm:content>
<h:form id="mobileLoginForm">
<pm:field>
<p:outputLabel value="Email:" />
<p:inputText id="email" value="#{loginService.userHelper.email}"/>
<p:message for="email" style="color:red; font-size: 12px" />
</pm:field>

<pm:field>
<p:outputLabel value="Password:" />
<p:password id="passWord" label="Password" value="#{loginService.userHelper.password}" />
<h:message for="passWord" style="color:red; font-size: 12px" />
</pm:field>

<br />
<p:commandButton value="Login" type="submit" action="#{loginService.login('mobile')}" />
<br />

<p:outputLabel value=" " />
<p:link style="font-size: 12px" outcome="pm:forgotPwd?transition=pop" value="Forgot Password" />
<br />
</h:form>
<ui:include src="mobilefooter.xhtml" />
</pm:content>
</pm:page>


</html>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 38 guests