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
1 parent
af43944
commit de84d46
Showing
9 changed files
with
327 additions
and
0 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,10 @@ | ||
# BootsFaces-Examples: Login Screen | ||
This demo is an attempt to reproduce issue 227. | ||
|
||
Run this as a Tomcat application. The URL to start typically is http://localhost:8080/ListGenerator | ||
|
||
Tested on: | ||
<ul> | ||
<li>Tomcat 8.0 / Oracle Mojarra 2.2.7</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,127 @@ | ||
<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>be.slbo</groupId> | ||
<artifactId>ListGenerator</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>war</packaging> | ||
|
||
<name>ListGenerator</name> | ||
|
||
<properties> | ||
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.eclipse.persistence</groupId> | ||
<artifactId>eclipselink</artifactId> | ||
<version>2.5.2</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax</groupId> | ||
<artifactId>javaee-web-api</artifactId> | ||
<version>7.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.primefaces.extensions</groupId> | ||
<artifactId>all-themes</artifactId> | ||
<version>1.0.8</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.primefaces</groupId> | ||
<artifactId>primefaces</artifactId> | ||
<version>5.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish</groupId> | ||
<artifactId>javax.faces</artifactId> | ||
<version>2.2.7</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>net.bootsfaces</groupId> | ||
<artifactId>bootsfaces</artifactId> | ||
<version>0.8.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>jstl</groupId> | ||
<artifactId>jstl</artifactId> | ||
<version>1.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-logging</groupId> | ||
<artifactId>commons-logging</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.xmlbeans</groupId> | ||
<artifactId>xmlbeans</artifactId> | ||
<version>2.6.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi</artifactId> | ||
<version>3.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.poi</groupId> | ||
<artifactId>poi-ooxml</artifactId> | ||
<version>3.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>dom4j</groupId> | ||
<artifactId>dom4j</artifactId> | ||
<version>1.6.1</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.unboundid</groupId> | ||
<artifactId>unboundid-ldapsdk</artifactId> | ||
<version>3.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.novell.ldap</groupId> | ||
<artifactId>jldap</artifactId> | ||
<version>4.3</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<compilerArguments> | ||
<endorseddirs>${endorsed.dir}</endorseddirs> | ||
</compilerArguments> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>2.1.1</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<finalName>ListGenerator</finalName> | ||
</build> | ||
|
||
</project> |
34 changes: 34 additions & 0 deletions
34
issue227/src/main/java/Authentification/IdentificationController.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 Authentification; | ||
|
||
public class IdentificationController { | ||
|
||
private String login; | ||
private String password; | ||
public void init() { | ||
|
||
} | ||
|
||
public void identify() { | ||
|
||
} | ||
|
||
public boolean isSession(){ | ||
return true; | ||
} | ||
|
||
public String getLogin() { | ||
return login; | ||
} | ||
|
||
public void setLogin(String login) { | ||
this.login = login; | ||
} | ||
|
||
public String getPassword() { | ||
return password; | ||
} | ||
|
||
public void setPassword(String password) { | ||
this.password = password; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
issue227/src/main/java/be/slbo/listgenerator/ColumnsView.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,5 @@ | ||
package be.slbo.listgenerator; | ||
|
||
public class ColumnsView { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
issue227/src/main/java/be/slbo/listgenerator/ListGeneratorGui.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,5 @@ | ||
package be.slbo.listgenerator; | ||
|
||
public class ListGeneratorGui { | ||
|
||
} |
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,27 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
|
||
<!-- =========== FULL CONFIGURATION FILE ================================== --> | ||
|
||
<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"> | ||
<managed-bean> | ||
<managed-bean-name>listGeneratorGui</managed-bean-name> | ||
<managed-bean-class>be.slbo.listgenerator.ListGeneratorGui</managed-bean-class> | ||
<managed-bean-scope>session</managed-bean-scope> | ||
</managed-bean> | ||
<managed-bean> | ||
<managed-bean-name>IdentificationController</managed-bean-name> | ||
<managed-bean-class>Authentification.IdentificationController</managed-bean-class> | ||
<managed-bean-scope>session</managed-bean-scope> | ||
</managed-bean> | ||
<managed-bean> | ||
<managed-bean-name>dtColumnsView</managed-bean-name> | ||
<managed-bean-class>be.slbo.listgenerator.ColumnsView</managed-bean-class> | ||
<managed-bean-scope>session</managed-bean-scope> | ||
</managed-bean> | ||
|
||
|
||
</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,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> | ||
<context-param> | ||
<param-name>javax.faces.PROJECT_STAGE</param-name> | ||
<param-value>Production</param-value> | ||
</context-param> | ||
<servlet-mapping> | ||
<servlet-name>Faces Servlet</servlet-name> | ||
<url-pattern>*.jsf</url-pattern> | ||
</servlet-mapping> | ||
<context-param> | ||
<param-name>primefaces.THEME</param-name> | ||
<param-value>bootstrap</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>60</session-timeout> | ||
</session-config> | ||
<welcome-file-list> | ||
<welcome-file>faces/login.xhtml</welcome-file> | ||
</welcome-file-list> | ||
<error-page> | ||
<exception-type>javax.faces.application.ViewExpiredException</exception-type> | ||
<location>/errorPage.xhtml</location> | ||
</error-page> | ||
<context-param> | ||
<param-name>BootsFaces_USETHEME</param-name> | ||
<param-value>true</param-value> | ||
</context-param> | ||
</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,73 @@ | ||
<?xml version='1.0' encoding='UTF-8' ?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<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:b="http://bootsfaces.net/ui" style=" height: 100%"> | ||
<h:head> | ||
<title>ListGenerator</title> | ||
<h:outputStylesheet library="css" name="css1.css" /> | ||
</h:head> | ||
<f:metadata> | ||
<f:event listener="#{IdentificationController.init()}" type="preRenderView" /> | ||
</f:metadata> | ||
<h:body style="background-color:#EEE;" > | ||
<h:form id="form" style="width:100%; background-color:#EEE;" rendered="#{IdentificationController.session}"> | ||
<p:idleMonitor timeout="3600000" onidle="PF('idleDialog').show()" /> | ||
<p:confirmDialog id="confirmDialog" | ||
message="La session a été clôturée. Vous devez recharger la page en sélectionnant l'url et appuyez sur enter" | ||
header="Session clôturée" severity="alert" widgetVar="idleDialog"> | ||
</p:confirmDialog> | ||
<p:growl life="10000" id="growl"/> | ||
<p:focus /> | ||
<p:panelGrid style="margin: 0 auto; font-size:95%; background-color:#EEE;"> | ||
<!-- LOGIN --> | ||
<p:row> | ||
<p:column style="background-color: #EEE !important;" > | ||
<h2>Authentification</h2> | ||
</p:column> | ||
</p:row> | ||
<!-- Login --> | ||
<p:row> | ||
<p:column style=" background-color: #EEE !important;" > | ||
<b:inputText id="TxtLogin" | ||
value="#{IdentificationController.login}" | ||
required="true" > | ||
<f:facet name="prepend"> | ||
<b:iconAwesome name="user" /> | ||
</f:facet> | ||
</b:inputText> | ||
<p:watermark for="TxtLogin" value="Login" id="watermark" /> | ||
</p:column > | ||
</p:row> | ||
<!-- PW --> | ||
<p:row> | ||
<p:column style="background-color: #EEE !important;" > | ||
<b:inputSecret id="TxtPw" | ||
value="#{IdentificationController.password}" | ||
required="true"> | ||
<f:facet name="prepend"> | ||
<b:iconAwesome name="key" /> | ||
</f:facet> | ||
</b:inputSecret> | ||
<p:watermark for="TxtPw" value="Mot de passe" id="watermark2" /> | ||
</p:column > | ||
</p:row> | ||
<!-- BOUTON --> | ||
<p:row> | ||
<p:column style="text-align:center; background-color: #EEE !important;"> | ||
<b:commandButton value="Se connecter" id="BLImg" ajax="false" look="primary" style="width:100%;" | ||
action="#{IdentificationController.identify}"/> | ||
</p:column > | ||
</p:row> | ||
</p:panelGrid> | ||
</h:form> | ||
<h:form id="form2" style="width:100%;" rendered="#{!IdentificationController.session}"> | ||
<center> | ||
<p> vous êtes déjà connecté en tant que <span style="color:green">#{IdentificationController.login}</span> veuillez cliquer sur le button plus bas pour être redirigé </p> | ||
<br /> | ||
<b:commandButton look="primary" ajax="false" action="index.xhtml" value="Redirection vers ListGenerator"/> | ||
</center> | ||
</h:form> | ||
</h:body> | ||
</html> |