-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewActionManagedBean.java
More file actions
45 lines (35 loc) · 943 Bytes
/
ViewActionManagedBean.java
File metadata and controls
45 lines (35 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package org.javaee7.chapter02.jsf;
import javax.faces.bean.RequestScoped;
import javax.inject.Named;
/**
*
* @author Juneau
*/
@Named(value="viewActionManagedBean")
@RequestScoped
public class ViewActionManagedBean {
private String msgFromBean = "Original Message in Bean...";
/**
* Creates a new instance of ViewActionManagedBean
*/
public ViewActionManagedBean() {
}
public String viewActionExample() {
msgFromBean = "The view action has been invoked!";
System.out.println("This is being written to the server log when the "
+ "view is accessed...");
return null;
}
/**
* @return the msgFromBean
*/
public String getMsgFromBean() {
return msgFromBean;
}
/**
* @param msgFromBean the msgFromBean to set
*/
public void setMsgFromBean(String msgFromBean) {
this.msgFromBean = msgFromBean;
}
}