1 | package org.medias.eccad.presentation.composant; |
---|
2 | |
---|
3 | import javax.faces.component.*; |
---|
4 | import javax.faces.webapp.UIComponentTag; |
---|
5 | |
---|
6 | |
---|
7 | public class TagDivButton extends UIComponentTag{ |
---|
8 | private String classe; |
---|
9 | private String onclick; |
---|
10 | private String style; |
---|
11 | |
---|
12 | // **************************************// |
---|
13 | // Type du Composant (pour la librairie .tld) |
---|
14 | // **************************************// |
---|
15 | |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | // **************************************// |
---|
20 | // Type de Renderer |
---|
21 | // **************************************// |
---|
22 | |
---|
23 | public String getRendererType() { |
---|
24 | return null; |
---|
25 | } |
---|
26 | // **************************************// |
---|
27 | // VARIABLES |
---|
28 | // **************************************// |
---|
29 | |
---|
30 | //private String facteurZoom; |
---|
31 | |
---|
32 | // **************************************// |
---|
33 | // Methode Release |
---|
34 | // **************************************// |
---|
35 | |
---|
36 | public void release(){ |
---|
37 | super.release(); |
---|
38 | //facteurZoom = null; |
---|
39 | |
---|
40 | } |
---|
41 | |
---|
42 | // **************************************// |
---|
43 | // Methode SETPROPERTIES, |
---|
44 | // utilisée à la premiÚre lecture du composant |
---|
45 | // **************************************// |
---|
46 | |
---|
47 | protected void setProperties(UIComponent component){ |
---|
48 | super.setProperties(component); |
---|
49 | ComposantPopup compo= (ComposantPopup) component; |
---|
50 | |
---|
51 | if (classe != null) |
---|
52 | compo.getAttributes().put("styleClass", classe); |
---|
53 | if (style != null) { |
---|
54 | //system.out.println("ajout du style :: " + style); |
---|
55 | compo.getAttributes().put("style", style); |
---|
56 | } |
---|
57 | |
---|
58 | } |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | public String getStyleClass() { |
---|
63 | return classe; |
---|
64 | } |
---|
65 | |
---|
66 | |
---|
67 | public void setStyleClass(String classe) { |
---|
68 | this.classe = classe; |
---|
69 | } |
---|
70 | |
---|
71 | |
---|
72 | public String getOnclick() { |
---|
73 | return onclick; |
---|
74 | } |
---|
75 | |
---|
76 | |
---|
77 | public void setOnclick(String onclick) { |
---|
78 | this.onclick = onclick; |
---|
79 | } |
---|
80 | |
---|
81 | |
---|
82 | public String getStyle() { |
---|
83 | return style; |
---|
84 | } |
---|
85 | |
---|
86 | |
---|
87 | public void setStyle(String style) { |
---|
88 | this.style = style; |
---|
89 | } |
---|
90 | |
---|
91 | |
---|
92 | public String getComponentType() { |
---|
93 | return("divButton"); |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|