Commits

Micha Kops committed d18f29c

ManagedBean and faces-config added.

Comments (0)

Files changed (6)

 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
 	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
 			<name>Java.net Repository for Maven</name>
 			<url>http://download.java.net/maven/2</url>
 		</repository>
-		<repository>
-			<id>JBoss repository</id>
-			<url>http://repository.jboss.com/maven2/</url>
-		</repository>
 	</repositories>
 
 	<build>
 		<dependency>
 			<groupId>org.primefaces</groupId>
 			<artifactId>primefaces</artifactId>
-			<version>3.0.M2</version>
+			<version>3.1-SNAPSHOT</version>
 		</dependency>
 		<dependency>
 			<groupId>com.sun.faces</groupId>
 			<artifactId>mobile</artifactId>
 			<version>1.0-SNAPSHOT</version>
 		</dependency>
-
-		<dependency>
-			<groupId>org.primefaces.themes</groupId>
-			<artifactId>ui-lightness</artifactId>
-			<version>1.0.2</version>
-		</dependency>
 	</dependencies>
 
 

src/main/java/com/hascode/tutorial/DemoBean.java

+package com.hascode.tutorial;
+
+import java.util.Date;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.RequestScoped;
+
+@ManagedBean
+@RequestScoped
+public class DemoBean {
+	public String output() {
+		return "It is " + new Date().toString();
+	}
+}

src/main/webapp/WEB-INF/faces-config.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"
+	xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
+	<name>hascode-demo</name>
+	<application>
+		<default-render-kit-id>PRIMEFACES_MOBILE</default-render-kit-id>
+	</application>
+</faces-config>

src/main/webapp/ajax.xhtml

+<f:view xmlns="http://www.w3.org/1999/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:pm="http://primefaces.org/mobile" contentType="text/html">
+
+	<pm:page title="hasCode.com PrimeFaces Mobile Tutorial - AJAX">
+		<pm:view id="main">
+			<pm:header title="AJAX Sample" />
+			<pm:content>
+				<h:form>
+				</h:form>
+			</pm:content>
+		</pm:view>
+	</pm:page>
+</f:view>

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.prime.com.tr/ui"
+	xmlns:p="http://primefaces.org/ui"
 	xmlns:pm="http://primefaces.org/mobile" contentType="text/html">
 
-	<pm:page title="hasCode.com PrimeFaces Mobile Tutorial">
+	<pm:page title="hasCode.com PrimeFaces Mobile Tutorial - Simple Navigation">
 		<pm:view id="viewChapter1">
 			<pm:header title="First Chapter" />
 			<pm:content>