jsf-spring-integration - mavenizing
(cherry picked from commit eba201c)
This commit is contained in:
parent
ef53002000
commit
6e6f7c4e1e
38
jsf/pom.xml
38
jsf/pom.xml
|
@ -13,12 +13,39 @@
|
|||
<version>0.1-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<dependencies>
|
||||
<!-- http://mvnrepository.com/artifact/com.sun.faces/mojarra-jsf-impl -->
|
||||
<dependency>
|
||||
<groupId>com.sun.faces</groupId>
|
||||
<artifactId>mojarra-jsf-impl</artifactId>
|
||||
<version>2.0.0-b04</version>
|
||||
<artifactId>jsf-api</artifactId>
|
||||
<version>${com.sun.faces.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.faces</groupId>
|
||||
<artifactId>jsf-impl</artifactId>
|
||||
<version>${com.sun.faces.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-websocket</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-messaging</artifactId>
|
||||
<version>${org.springframework.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
@ -34,4 +61,9 @@
|
|||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<org.springframework.version>4.2.5.RELEASE</org.springframework.version>
|
||||
<com.sun.faces.version>2.1.7</com.sun.faces.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -1,7 +1,3 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.baeldung.springintegration.dao;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -10,16 +6,13 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* @author Tayo
|
||||
*/
|
||||
public class UserManagementDAOImpl extends IUserManagementDAO {
|
||||
|
||||
private List<String> users;
|
||||
|
||||
@PostConstruct
|
||||
public void initUserList() {
|
||||
users = new ArrayList<String>();
|
||||
users = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
">
|
||||
|
||||
<bean class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
|
||||
<bean class="com.baeldung.dao.UserManagementDAOImpl" id="userManagementDAO"/>
|
||||
<bean class="com.baeldung.springintegration.dao.UserManagementDAOImpl" id="userManagementDAO"/>
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<application>
|
||||
<resource-bundle>
|
||||
<base-name>
|
||||
com.baeldung.resources.messages
|
||||
messages
|
||||
</base-name>
|
||||
<var>
|
||||
msg
|
||||
|
@ -18,7 +18,7 @@
|
|||
</resource-bundle>
|
||||
<resource-bundle>
|
||||
<base-name>
|
||||
com.baeldung.resources.constraints
|
||||
constraints
|
||||
</base-name>
|
||||
<var>
|
||||
constraints
|
||||
|
|
|
@ -1,27 +1,28 @@
|
|||
<?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">
|
||||
<!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">
|
||||
|
||||
<h:head>
|
||||
<title>Baeldung | Register</title>
|
||||
</h:head>
|
||||
<h:body>
|
||||
|
||||
<h:form>
|
||||
<f:ajax>
|
||||
<h:panelGrid id="theGrid" columns="3">
|
||||
<h:outputText value="Username"/>
|
||||
<h:inputText id="firstName" binding="#{userNameTextbox}" required="true" requiredMessage="#{msg['message.valueRequired']}" value="#{registration.userName}"/>
|
||||
<h:message for="firstName" />
|
||||
<h:commandButton value="#{msg['label.saveButton']}" action="#{registration.theUserDao.createUser(userNameTextbox.value)}"/>
|
||||
<h:outputText value="#{registration.operationMessage}"/>
|
||||
</h:panelGrid>
|
||||
</f:ajax>
|
||||
</h:form>
|
||||
|
||||
</h:body>
|
||||
<h:head>
|
||||
<title>Baeldung | Register</title>
|
||||
</h:head>
|
||||
<h:body>
|
||||
<h:form>
|
||||
<f:ajax>
|
||||
<h:panelGrid id="theGrid" columns="3">
|
||||
<h:outputText value="Username"/>
|
||||
<h:inputText id="firstName" binding="#{userNameTextbox}" required="true"
|
||||
requiredMessage="#{msg['message.valueRequired']}" value="#{registration.userName}"/>
|
||||
<h:message for="firstName"/>
|
||||
<h:commandButton value="#{msg['label.saveButton']}"
|
||||
action="#{registration.theUserDao.createUser(userNameTextbox.value)}"/>
|
||||
<h:outputText value="#{registration.operationMessage}"/>
|
||||
</h:panelGrid>
|
||||
</f:ajax>
|
||||
</h:form>
|
||||
</h:body>
|
||||
</html>
|
||||
|
||||
|
|
Loading…
Reference in New Issue