forked from stephanrauh/BootsFaces-Examples
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
stephanrauh
committed
Mar 11, 2015
1 parent
3b54a9a
commit 8cb3ac7
Showing
12 changed files
with
284 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/target/ | ||
rebel.xml | ||
.metadata | ||
.settings | ||
dist | ||
.faces-config.xml.jsfdia | ||
.project | ||
.classpath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# BootsFaces-Examples: PanelGrid, PrimeFaces and AngularFaces | ||
This demo shows how to set up a BootsFaces project using both PrimeFaces and AngularFaces. Along the way, it demonstrates | ||
the BootsFaces panel grid. | ||
|
||
Run this as a Tomcat application. The URL to start typically is http://localhost:8080/BootsFacesPanelGrid/index.jsf | ||
|
||
Tested on: | ||
<ul> | ||
<li>Tomcat 8.0 / Oracle Mojarra 2.2.10</li> | ||
<li>Tomcat 8.0 / Apache MyFaces 2.2.7</li> | ||
<li>WildFly 8.2</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>de.beyondjava</groupId> | ||
<artifactId>BootsFacesPanelGrid</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
<name>BootsFacesPanelGrid</name> | ||
<url>http://www.beyondjava.net</url> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<maven.compiler.source>1.7</maven.compiler.source> | ||
<maven.compiler.target>1.7</maven.compiler.target> | ||
</properties> | ||
<repositories> | ||
<repository> | ||
<id>prime-repo</id> | ||
<name>PrimeFaces Maven Repository</name> | ||
<url>http://repository.primefaces.org</url> | ||
<layout>default</layout> | ||
</repository> | ||
</repositories> | ||
<dependencies> | ||
<dependency> | ||
<groupId>net.bootsfaces</groupId> | ||
<artifactId>bootsfaces</artifactId> | ||
<version>0.6.5</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.primefaces</groupId> | ||
<artifactId>primefaces</artifactId> | ||
<version>5.1</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.primefaces.themes</groupId> | ||
<artifactId>bootstrap</artifactId> | ||
<version>1.0.10</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>de.beyondjava</groupId> | ||
<artifactId>angularFaces-core</artifactId> | ||
<version>2.1.2</version> | ||
</dependency> | ||
</dependencies> | ||
<profiles> | ||
<profile> | ||
<id>ApplicationServer</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
</activation> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun.faces</groupId> | ||
<artifactId>jsf-api</artifactId> | ||
<version>2.2.10</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
<profile> | ||
<id>Mojarra</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.sun.faces</groupId> | ||
<artifactId>jsf-api</artifactId> | ||
<version>2.2.10</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.faces</groupId> | ||
<artifactId>jsf-impl</artifactId> | ||
<version>2.2.10</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
<profile> | ||
<id>MyFaces</id> | ||
<activation> | ||
<activeByDefault>false</activeByDefault> | ||
</activation> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.myfaces.core</groupId> | ||
<artifactId>myfaces-api</artifactId> | ||
<version>2.2.7</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.myfaces.core</groupId> | ||
<artifactId>myfaces-impl</artifactId> | ||
<version>2.2.7</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
</dependencies> | ||
</profile> | ||
</profiles> | ||
</project> |
34 changes: 34 additions & 0 deletions
34
PanelGrid/src/main/java/de/beyondjava/bootsfaces/examples/Person.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package de.beyondjava.bootsfaces.examples; | ||
|
||
import java.util.Date; | ||
|
||
import javax.faces.bean.ManagedBean; | ||
import javax.faces.bean.ViewScoped; | ||
|
||
@ViewScoped | ||
@ManagedBean | ||
public class Person { | ||
|
||
private String firstName; | ||
private String lastName; | ||
private Date birthdate; | ||
public Date getBirthdate() { | ||
return birthdate; | ||
} | ||
public void setBirthdate(Date birthdate) { | ||
this.birthdate = birthdate; | ||
} | ||
public String getLastName() { | ||
return lastName; | ||
} | ||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
public String getFirstName() { | ||
return firstName; | ||
} | ||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faces-config | ||
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-facesconfig_2_2.xsd" | ||
version="2.2"> | ||
|
||
</faces-config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?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"> | ||
|
||
<context-param> | ||
<param-name>javax.faces.FACELETS_DECORATORS</param-name> | ||
<param-value> | ||
de.beyondjava.angularFaces.core.tagTransformer.AngularTagDecorator | ||
</param-value> | ||
</context-param> | ||
<context-param> | ||
<param-name>primefaces.THEME</param-name> | ||
<param-value>bootstrap</param-value> | ||
</context-param> | ||
|
||
<context-param> | ||
<param-name>BootsFaces_USETHEME</param-name> | ||
<param-value>true</param-value> | ||
</context-param> | ||
<welcome-file-list> | ||
<welcome-file>index.jsf</welcome-file> | ||
</welcome-file-list> | ||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:b="http://bootsfaces.net/ui" xmlns:f="http://java.sun.com/jsf/core" xmlns:prime="http://primefaces.org/ui"> | ||
|
||
<h:head> | ||
<style> | ||
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus | ||
{ | ||
background-color: #ddd !important; | ||
} | ||
</style> | ||
</h:head> | ||
<h:body> | ||
<b:container > | ||
<b:tabView> | ||
<b:tab title="PrimeFaces" addLabels="false" addMessages="false"> | ||
<b:panel title="Contact information" look="info"> | ||
<h:form prependId="false" > | ||
<b:panelGrid colSpans="2,3,7" size="xs"> | ||
<prime:outputLabel value="First name" for="@next" /> | ||
<prime:inputText value="#{person.firstName}" /> | ||
<prime:message for="@previous" /> | ||
<prime:outputLabel value="Last name" for="@next" /> | ||
<prime:inputText value="#{person.lastName}" /> | ||
<prime:message for="@previous" /> | ||
<prime:outputLabel value="Birthdate" for="@next" /> | ||
<prime:calendar value="#{person.birthdate}" /> | ||
<prime:message for="@previous" /> | ||
</b:panelGrid> | ||
</h:form> | ||
</b:panel> | ||
</b:tab> | ||
<b:tab title="PrimeFaces + AngularFaces"> | ||
<b:panel title="Contact information" look="info"> | ||
<h:form prependId="false" > | ||
<b:panelGrid colSpans="2,3,7" size="xs"> | ||
<prime:inputText value="#{person.firstName}" /> | ||
<prime:inputText value="#{person.lastName}" /> | ||
<prime:calendar value="#{person.birthdate}" /> | ||
</b:panelGrid> | ||
</h:form> | ||
</b:panel> | ||
</b:tab> | ||
</b:tabView> | ||
</b:container> | ||
</h:body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ResponsiveDesign/src/main/java/de/beyondjava/bootsfaces/examples/Person.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package de.beyondjava.bootsfaces.examples; | ||
|
||
import java.util.Date; | ||
|
||
import javax.faces.bean.ManagedBean; | ||
import javax.faces.bean.ViewScoped; | ||
|
||
@ViewScoped | ||
@ManagedBean | ||
public class Person { | ||
|
||
private String firstName; | ||
private String lastName; | ||
private Date birthdate; | ||
public Date getBirthdate() { | ||
return birthdate; | ||
} | ||
public void setBirthdate(Date birthdate) { | ||
this.birthdate = birthdate; | ||
} | ||
public String getLastName() { | ||
return lastName; | ||
} | ||
public void setLastName(String lastName) { | ||
this.lastName = lastName; | ||
} | ||
public String getFirstName() { | ||
return firstName; | ||
} | ||
public void setFirstName(String firstName) { | ||
this.firstName = firstName; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters