-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPtBean.java
More file actions
80 lines (67 loc) · 1.52 KB
/
PtBean.java
File metadata and controls
80 lines (67 loc) · 1.52 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.javaee7.chapter02.jsf;
import java.util.HashMap;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
/**
*
* @author Juneau
*/
@ManagedBean(name = "ptBean")
@RequestScoped
public class PtBean implements java.io.Serializable {
private String ptValue1;
private int ptValue2;
private Map ptValues = new HashMap();
/**
* Creates a new instance of PtBean
*/
public PtBean() {
}
/**
* @return the ptValue1
*/
public String getPtValue1() {
return ptValue1;
}
/**
* @param ptValue1 the ptValue1 to set
*/
public void setPtValue1(String ptValue1) {
this.ptValue1 = ptValue1;
if(!ptValues.isEmpty()){
ptValues.put("attr" + ptValues.size(), ptValue1);
}
}
/**
* @return the ptValue2
*/
public int getPtValue2() {
return ptValue2;
}
/**
* @param ptValue2 the ptValue2 to set
*/
public void setPtValue2(int ptValue2) {
this.ptValue2 = ptValue2;
if(!ptValues.isEmpty()){
ptValues.put("attr" + ptValues.size(), ptValue2);
}
}
/**
* @return the ptValues
*/
public Map getPtValues() {
return ptValues;
}
/**
* @param ptValues the ptValues to set
*/
public void setPtValues(Map ptValues) {
this.ptValues = ptValues;
}
}