File tree Expand file tree Collapse file tree 7 files changed +59
-33
lines changed
java/com/baeldung/springintegration/dao Expand file tree Collapse file tree 7 files changed +59
-33
lines changed Original file line number Diff line number Diff line change 1313 <version >0.1-SNAPSHOT</version >
1414 <packaging >war</packaging >
1515 <dependencies >
16- <!-- http://mvnrepository.com/artifact/com.sun.faces/mojarra-jsf-impl -->
1716 <dependency >
1817 <groupId >com.sun.faces</groupId >
19- <artifactId >mojarra- jsf-impl </artifactId >
20- <version >2.0.0-b04 </version >
18+ <artifactId >jsf-api </artifactId >
19+ <version >${com.sun.faces.version} </version >
2120 </dependency >
21+ <dependency >
22+ <groupId >com.sun.faces</groupId >
23+ <artifactId >jsf-impl</artifactId >
24+ <version >${com.sun.faces.version} </version >
25+ </dependency >
26+
27+ <!-- Spring -->
28+ <dependency >
29+ <groupId >org.springframework</groupId >
30+ <artifactId >spring-web</artifactId >
31+ <version >${org.springframework.version} </version >
32+ </dependency >
33+ <dependency >
34+ <groupId >org.springframework</groupId >
35+ <artifactId >spring-webmvc</artifactId >
36+ <version >${org.springframework.version} </version >
37+ </dependency >
38+ <dependency >
39+ <groupId >org.springframework</groupId >
40+ <artifactId >spring-websocket</artifactId >
41+ <version >${org.springframework.version} </version >
42+ </dependency >
43+ <dependency >
44+ <groupId >org.springframework</groupId >
45+ <artifactId >spring-messaging</artifactId >
46+ <version >${org.springframework.version} </version >
47+ </dependency >
48+
2249 </dependencies >
2350 <build >
2451 <plugins >
3461 </plugins >
3562 </build >
3663
64+ <properties >
65+ <!-- Spring -->
66+ <org .springframework.version>4.2.5.RELEASE</org .springframework.version>
67+ <com .sun.faces.version>2.1.7</com .sun.faces.version>
68+ </properties >
3769</project >
Original file line number Diff line number Diff line change 1- /*
2- * To change this template, choose Tools | Templates
3- * and open the template in the editor.
4- */
51package com .baeldung .springintegration .dao ;
62
73import java .util .ArrayList ;
106import java .util .logging .Logger ;
117import javax .annotation .PostConstruct ;
128
13- /**
14- * @author Tayo
15- */
169public class UserManagementDAOImpl extends IUserManagementDAO {
1710
1811 private List <String > users ;
1912
2013 @ PostConstruct
2114 public void initUserList () {
22- users = new ArrayList <String >();
15+ users = new ArrayList <>();
2316 }
2417
2518 @ Override
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1010" >
1111
1212 <bean class =" org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />
13- <bean class =" com.baeldung.dao.UserManagementDAOImpl" id =" userManagementDAO" />
13+ <bean class =" com.baeldung.springintegration. dao.UserManagementDAOImpl" id =" userManagementDAO" />
1414
1515</beans >
Original file line number Diff line number Diff line change 1010 <application >
1111 <resource-bundle >
1212 <base-name >
13- com.baeldung.resources. messages
13+ messages
1414 </base-name >
1515 <var >
1616 msg
1717 </var >
1818 </resource-bundle >
1919 <resource-bundle >
2020 <base-name >
21- com.baeldung.resources. constraints
21+ constraints
2222 </base-name >
2323 <var >
2424 constraints
Original file line number Diff line number Diff line change 11< ?xml version='1.0' encoding='UTF-8' ?>
2- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
34< html xmlns ="http://www.w3.org/1999/xhtml "
45 xmlns:h ="http://java.sun.com/jsf/html "
56
67 xmlns:f ="http://java.sun.com/jsf/core ">
78
8- < h:head >
9- < title > Baeldung | Register</ title >
10- </ h:head >
11- < h:body >
12-
13- < h:form >
14- < f:ajax >
15- < h:panelGrid id =" theGrid " columns =" 3 " >
16- < h:outputText value =" Username " />
17- < h:inputText id =" firstName " binding =" #{userNameTextbox} " required =" true " requiredMessage ="#{msg['message.valueRequired']} " value ="#{registration.userName} "/>
18- < h:message for ="firstName " />
19- < h:commandButton value ="#{msg['label.saveButton']} " action =" #{registration.theUserDao.createUser(userNameTextbox.value)} " />
20- < h:outputText value ="#{registration.operationMessage } "/>
21- </ h:panelGrid >
22- </ f:ajax >
23- </ h:form >
24-
25- </ h:body >
9+ < h:head >
10+ < title > Baeldung | Register</ title >
11+ </ h:head >
12+ < h:body >
13+ < h:form >
14+ < f:ajax >
15+ < h:panelGrid id =" theGrid " columns =" 3 " >
16+ < h:outputText value =" Username " / >
17+ < h:inputText id =" firstName " binding =" #{userNameTextbox} " required =" true "
18+ requiredMessage ="#{msg['message.valueRequired']} " value ="#{registration.userName} "/>
19+ < h:message for ="firstName "/>
20+ < h:commandButton value ="#{msg['label.saveButton']} "
21+ action ="#{registration.theUserDao.createUser(userNameTextbox.value) } "/>
22+ < h:outputText value =" #{registration.operationMessage} " / >
23+ </ h:panelGrid >
24+ </ f:ajax >
25+ </ h:form >
26+ </ h:body >
2627</ html >
2728
You can’t perform that action at this time.
0 commit comments