From c374d4ff7edb64572d7a1c58dcc8f997d6a22eac Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 16 Sep 2015 13:43:16 +0200 Subject: [PATCH] anwering SO question http://stackoverflow.com/questions/32599781/jsf-primefaces-and-bootsfaces --- PrimeFacesLayout/.gitignore | 9 ++ PrimeFacesLayout/README.md | 10 ++ PrimeFacesLayout/pom.xml | 112 ++++++++++++++++++ .../bootsfaces/examples/Sobean.java | 30 +++++ .../src/main/webapp/WEB-INF/faces-config.xml | 12 ++ .../src/main/webapp/WEB-INF/web.xml | 18 +++ PrimeFacesLayout/src/main/webapp/index.xhtml | 51 ++++++++ PrimeFacesLayout/src/main/webapp/page0.xhtml | 11 ++ PrimeFacesLayout/src/main/webapp/page1.xhtml | 13 ++ PrimeFacesLayout/src/main/webapp/page2.xhtml | 13 ++ PrimeFacesLayout/src/main/webapp/page3.xhtml | 13 ++ 11 files changed, 292 insertions(+) create mode 100644 PrimeFacesLayout/.gitignore create mode 100644 PrimeFacesLayout/README.md create mode 100644 PrimeFacesLayout/pom.xml create mode 100644 PrimeFacesLayout/src/main/java/de/beyondjava/bootsfaces/examples/Sobean.java create mode 100644 PrimeFacesLayout/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 PrimeFacesLayout/src/main/webapp/WEB-INF/web.xml create mode 100644 PrimeFacesLayout/src/main/webapp/index.xhtml create mode 100644 PrimeFacesLayout/src/main/webapp/page0.xhtml create mode 100644 PrimeFacesLayout/src/main/webapp/page1.xhtml create mode 100644 PrimeFacesLayout/src/main/webapp/page2.xhtml create mode 100644 PrimeFacesLayout/src/main/webapp/page3.xhtml diff --git a/PrimeFacesLayout/.gitignore b/PrimeFacesLayout/.gitignore new file mode 100644 index 0000000..b53f514 --- /dev/null +++ b/PrimeFacesLayout/.gitignore @@ -0,0 +1,9 @@ +/target/ +rebel.xml +.metadata +.settings +dist +.faces-config.xml.jsfdia +.project +.classpath +.DS_Store diff --git a/PrimeFacesLayout/README.md b/PrimeFacesLayout/README.md new file mode 100644 index 0000000..5c01821 --- /dev/null +++ b/PrimeFacesLayout/README.md @@ -0,0 +1,10 @@ +# BootsFaces-Examples: AJAX +This demo shows how to use the PrimeFaces layout with BootsFaces. +Also see http://stackoverflow.com/questions/32599781/jsf-primefaces-and-bootsfaces. + +Run this as a Tomcat application. The URL to start typically is http://localhost:8080/BootsFacesPrimeFacesLayout. + +Tested on: + diff --git a/PrimeFacesLayout/pom.xml b/PrimeFacesLayout/pom.xml new file mode 100644 index 0000000..6749b20 --- /dev/null +++ b/PrimeFacesLayout/pom.xml @@ -0,0 +1,112 @@ + + 4.0.0 + de.beyondjava + BootsFacesPrimeFacesLayout + 1.0.0-SNAPSHOT + war + BootsFacesPrimeFacesLayout + http://www.beyondjava.net + + UTF-8 + 1.7 + 1.7 + + + + prime-repo + PrimeFaces Maven Repository + http://repository.primefaces.org + default + + + + + net.bootsfaces + bootsfaces + 0.7.0 + + + org.primefaces + primefaces + 5.2 + compile + + + org.primefaces.themes + bootstrap + 1.0.10 + runtime + + + org.omnifaces + omnifaces + 1.10 + compile + + + javax.el + javax.el-api + 3.0.0 + provided + + + + + + + ApplicationServer + + false + + + + com.sun.faces + jsf-api + 2.2.10 + provided + + + + + Mojarra + + true + + + + com.sun.faces + jsf-api + 2.2.12 + compile + + + com.sun.faces + jsf-impl + 2.2.12 + runtime + + + + + MyFaces + + false + + + + org.apache.myfaces.core + myfaces-api + 2.2.7 + compile + + + org.apache.myfaces.core + myfaces-impl + 2.2.7 + runtime + + + + + diff --git a/PrimeFacesLayout/src/main/java/de/beyondjava/bootsfaces/examples/Sobean.java b/PrimeFacesLayout/src/main/java/de/beyondjava/bootsfaces/examples/Sobean.java new file mode 100644 index 0000000..361ed56 --- /dev/null +++ b/PrimeFacesLayout/src/main/java/de/beyondjava/bootsfaces/examples/Sobean.java @@ -0,0 +1,30 @@ +package de.beyondjava.bootsfaces.examples; +import java.io.Serializable; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; + +@ManagedBean +@SessionScoped +public class Sobean implements Serializable{ + private String page="page0"; + public void page0() { + page="page0"; + } + public void page1() { + page="page1"; + } + public void page2() { + page="page2"; + } + public void page3() { + page="page3"; + } + public String getPage() { + return page; + } + public void setPage(String page) { + this.page = page; + } + +} diff --git a/PrimeFacesLayout/src/main/webapp/WEB-INF/faces-config.xml b/PrimeFacesLayout/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..05eaf2f --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,12 @@ + + + + org.omnifaces.resourcehandler.CombinedResourceHandler + + + + diff --git a/PrimeFacesLayout/src/main/webapp/WEB-INF/web.xml b/PrimeFacesLayout/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..43eb3c8 --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,18 @@ + + + + + primefaces.THEME + bootstrap + + + + BootsFaces_USETHEME + true + + + index.jsf + + \ No newline at end of file diff --git a/PrimeFacesLayout/src/main/webapp/index.xhtml b/PrimeFacesLayout/src/main/webapp/index.xhtml new file mode 100644 index 0000000..d916b0f --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/index.xhtml @@ -0,0 +1,51 @@ + + + + + + PrimeFaces layout component and BootsFaces panels + + + + + +

PrimeFaces layout component and BootsFaces panels (and PrimeFaces AJAX)

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ \ No newline at end of file diff --git a/PrimeFacesLayout/src/main/webapp/page0.xhtml b/PrimeFacesLayout/src/main/webapp/page0.xhtml new file mode 100644 index 0000000..ff3f003 --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/page0.xhtml @@ -0,0 +1,11 @@ + + + +

Welcome!

+

In the next three steps, you can enter your name, the street and the city you live in. Just click the three consecutive menu items.

+
+ \ No newline at end of file diff --git a/PrimeFacesLayout/src/main/webapp/page1.xhtml b/PrimeFacesLayout/src/main/webapp/page1.xhtml new file mode 100644 index 0000000..9df86eb --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/page1.xhtml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/PrimeFacesLayout/src/main/webapp/page2.xhtml b/PrimeFacesLayout/src/main/webapp/page2.xhtml new file mode 100644 index 0000000..804e843 --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/page2.xhtml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/PrimeFacesLayout/src/main/webapp/page3.xhtml b/PrimeFacesLayout/src/main/webapp/page3.xhtml new file mode 100644 index 0000000..76f3ba9 --- /dev/null +++ b/PrimeFacesLayout/src/main/webapp/page3.xhtml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file