Commits

Micha Kops  committed 1dbcf56

Mutiple pages sample added

  • Participants
  • Parent commits 0b46cf9

Comments (0)

Files changed (3)

 			<version>1.0-SNAPSHOT</version>
 		</dependency>
 
+		<dependency>
+			<groupId>org.primefaces.themes</groupId>
+			<artifactId>ui-lightness</artifactId>
+			<version>1.0.2</version>
+		</dependency>
 	</dependencies>
 
 

File src/main/webapp/WEB-INF/web.xml

  "http://java.sun.com/dtd/web-app_2_3.dtd" >
 
 <web-app>
-  <display-name>hasCode.com PrimeFaces Mobile Tutorial</display-name>
-   <context-param>
-        <param-name>javax.faces.PROJECT_STAGE</param-name>
-        <param-value>Development</param-value>
-    </context-param>
-    <servlet>
-        <servlet-name>Faces Servlet</servlet-name>
-        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
-    </servlet>
-    <servlet-mapping>
-        <servlet-name>Faces Servlet</servlet-name>
-        <url-pattern>*.xhtml</url-pattern>
-    </servlet-mapping>
-    <welcome-file-list>
-	<welcome-file>/demo.xhtml</welcome-file>
-</welcome-file-list>
+	<display-name>hasCode.com PrimeFaces Mobile Tutorial</display-name>
+	<context-param>
+		<param-name>javax.faces.PROJECT_STAGE</param-name>
+		<param-value>Development</param-value>
+	</context-param>
+	<context-param>
+		<param-name>com.sun.faces.allowTextChildren</param-name>
+		<param-value>true</param-value>
+	</context-param>
+	
+	<servlet>
+		<servlet-name>Faces Servlet</servlet-name>
+		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+	</servlet>
+	<servlet>
+		<servlet-name>Resource Servlet</servlet-name>
+		<servlet-class>org.primefaces.resource.ResourceServlet</servlet-class>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>Resource Servlet</servlet-name>
+		<url-pattern>/primefaces_resource/*</url-pattern>
+	</servlet-mapping>
+	<servlet-mapping>
+		<servlet-name>Faces Servlet</servlet-name>
+		<url-pattern>*.xhtml</url-pattern>
+	</servlet-mapping>
+
+
+	<welcome-file-list>
+		<welcome-file>/demo.xhtml</welcome-file>
+	</welcome-file-list>
 </web-app>

File src/main/webapp/demo.xhtml

 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ui="http://java.sun.com/jsf/facelets"
-	xmlns:p="http://primefaces.org/ui"
+	xmlns:p="http://primefaces.prime.com.tr/ui"
 	xmlns:pm="http://primefaces.org/mobile" contentType="text/html">
 
-	<pm:page title="Components">
-		<pm:view id="main">
-			<pm:header title="hasCode Mobile" swatch="h" />
-
+	<pm:page title="hasCode.com PrimeFaces Mobile Tutorial">
+		<pm:view id="viewChapter1">
+			<pm:header title="First Chapter" />
 			<pm:content>
+				<h:form>
+					<p:commandButton value="Go to second chapter" action="pm:viewChapter2" />
+				</h:form>
+				This is the first chapter
 			</pm:content>
 		</pm:view>
+		<pm:view id="viewChapter2">
+			<pm:header title="Second Chapter" />
+			<pm:content>
+				<h:form>
+					<p:commandButton value="Go to first chapter" action="pm:viewChapter1" />
+				</h:form>
+				This is the second chapter
+</pm:content>
+		</pm:view>
 	</pm:page>
-
 </f:view>