1 package ecar.bean;
2
3 import javax.servlet.http.HttpServletRequest;
4
5
6
7
8
9
10
11 public class NomeImgsNivelPlanejamentoBean {
12
13 private String nome;
14 private String title;
15
16
17
18
19
20
21
22
23
24
25 public NomeImgsNivelPlanejamentoBean(String nome, String title){
26 this.nome = nome;
27 this.title = title;
28 }
29
30
31
32
33
34
35
36
37
38 public String getNome() {
39 return nome;
40 }
41
42
43
44
45
46
47
48
49
50 public void setNome(String nome) {
51 this.nome = nome;
52 }
53
54
55
56
57
58
59
60
61
62 public String getTitle() {
63 return title;
64 }
65
66
67
68
69
70
71
72
73
74 public void setTitle(String title) {
75 this.title = title;
76 }
77
78 public String geraHtmlImg(HttpServletRequest request){
79 String path = request.getContextPath() + "/images/relAcomp/";
80
81 if(getNome() != null && !"".equals(getNome()))
82 return "<img src=\"" + path + getNome() + "\" title=\"" + getTitle() + "\"> ";
83 else
84 return " ";
85 }
86
87 }