File tree 6 files changed +111
-1
lines changed
java/com/thenaglecode/jsf
6 files changed +111
-1
lines changed Original file line number Diff line number Diff line change
1
+ package com .thenaglecode .jsf ;
2
+
3
+ import javax .faces .bean .ManagedBean ;
4
+
5
+ /**
6
+ * Created with IntelliJ IDEA.
7
+ * User: jxnagl
8
+ * Date: 7/31/13
9
+ * Time: 1:58 PM
10
+ */
11
+
12
+ @ ManagedBean (name = "main" )
13
+ public class MainUIController {
14
+
15
+ private String magic ;
16
+
17
+ public String getHelloWorld (){
18
+ return "hello world" ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ package com .thenaglecode .jsf ;
2
+
3
+ import javax .faces .bean .ManagedBean ;
4
+
5
+ /**
6
+ * Created with IntelliJ IDEA.
7
+ * User: jxnagl
8
+ * Date: 7/31/13
9
+ * Time: 2:48 PM
10
+ */
11
+ @ ManagedBean (name = "navigationController" )
12
+ public class NavigationController {
13
+ public String moveToPage1 (){
14
+ return "page1" ;
15
+ }
16
+
17
+ public String moveToRandomGeneratorPage (){
18
+ return "random" ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change
1
+ package com .thenaglecode .jsf ;
2
+
3
+ import javax .faces .bean .ManagedBean ;
4
+
5
+ /**
6
+ * Created with IntelliJ IDEA.
7
+ * User: jxnagl
8
+ * Date: 7/31/13
9
+ * Time: 2:58 PM
10
+ */
11
+
12
+ @ ManagedBean (name = "random" )
13
+ public class Random {
14
+ }
Original file line number Diff line number Diff line change 17
17
</ h:head >
18
18
19
19
< h:body >
20
- Place your content here
20
+ #{main.helloWorld}
21
+ < h:form >
22
+ < h:commandButton action ="#{navigationController.moveToPage1} "
23
+ value ="Page1 " />
24
+ </ h:form >
21
25
</ h:body >
22
26
23
27
</ html >
Original file line number Diff line number Diff line change
1
+ < ?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Created by IntelliJ IDEA.
4
+ User: jxnagl
5
+ Date: 7/31/13
6
+ Time: 2:50 PM
7
+ -->
8
+ <!DOCTYPE html
9
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
10
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11
+
12
+ < html xmlns ="http://www.w3.org/1999/xhtml "
13
+ xmlns:h ="http://java.sun.com/jsf/html ">
14
+
15
+ < h:head >
16
+ < title > Simple JSF Facelets page</ title >
17
+ </ h:head >
18
+
19
+ < h:body >
20
+ < h1 > this is page 1</ h1 >
21
+ </ h:body >
22
+
23
+ </ html >
Original file line number Diff line number Diff line change
1
+ < ?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ Created by IntelliJ IDEA.
4
+ User: jxnagl
5
+ Date: 7/31/13
6
+ Time: 2:55 PM
7
+ -->
8
+ <!DOCTYPE html
9
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
10
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11
+
12
+ < html xmlns ="http://www.w3.org/1999/xhtml "
13
+ xmlns:h ="http://java.sun.com/jsf/html ">
14
+
15
+ < h:head >
16
+ < title > Simple JSF Facelets page</ title >
17
+ </ h:head >
18
+
19
+ < h:body >
20
+ < h:form >
21
+ < div >
22
+ < h3 > Generate the next random number:</ h3 >
23
+ < h:commandButton action ="#{navigationController.moveToRandomGeneratorPage} "
24
+ value ="Generate "/>
25
+ </ div >
26
+ </ h:form >
27
+ </ h:body >
28
+
29
+ </ html >
You can’t perform that action at this time.
0 commit comments