source: ether_eccad/trunk/ECCAD_INTERFACE/WEB-INF/src/org/medias/eccad/presentation/composant/ComposantPopup.java @ 70

Last change on this file since 70 was 70, checked in by cbipsl, 14 years ago

maj eccad V3.2

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1package org.medias.eccad.presentation.composant;
2
3import javax.faces.component.*;
4import javax.faces.context.*;
5import java.io.*;
6
7
8public class ComposantPopup extends UIOutput {
9
10       
11//**************************************//
12//      VARIABLES
13//**************************************//
14       
15        private String classe;
16//      private String onclick;
17        private String style;
18//      private String value;
19         
20//**************************************//
21//  CONSTRUCTEUR
22//**************************************//
23       
24        public ComposantPopup() {
25                // TODO Auto-generated constructor stub
26        }
27       
28//**************************************//
29//   DEBUT ENCODAGE COMPOSANT
30//**************************************//
31
32        public void encodeBegin(FacesContext context) throws IOException {
33                //system.out.println("encodebegin " );         
34                //system.out.println(getAttributes().entrySet());
35                /** RECUPERARTION DES ATTRIBUTS DU COMPOSANT CARTE **/
36               
37                        if (getAttributes().containsKey("styleClass"))
38                                classe=(String)getAttributes().get("styleClass");
39                        if (getAttributes().containsKey("style")) {
40                                //system.out.println("ici");
41                                style=(String)getAttributes().get("style");
42                        }
43//                      if (getAttributes().containsKey("onclick"))
44//                              onclick=(String)getAttributes().get("onclick");
45                       
46                        /** ENCODAGE **/                               
47                               
48                        ResponseWriter writer = context.getResponseWriter();
49                                 
50                        /** JAVASCRIPT **/             
51                                //String appel_javascript="<SCRIPT Language='Javascript' Src='/Mapscript/javascript/script_navigation.js'></SCRIPT>\n";
52                                //writer.write(appel_javascript);       
53                       
54                        /** BARRE DE NAVIGATION **/
55                               
56                       
57                                String div= "<div class=\"" + classe + "\" style=\"" + style + "\">\n";
58                        writer.write(div);
59        }
60
61       
62       
63       
64       
65       
66       
67//**************************************//
68//   FIN ENCODAGE COMPOSANT
69//**************************************//
70
71        public void encodeEnd(FacesContext context)  throws IOException {
72                ResponseWriter writer = context.getResponseWriter();
73                String fin_tableau="</div>\n";
74                writer.write(fin_tableau);
75        }
76
77//**************************************//
78// DECODAGE COMPOSANT
79//**************************************//
80
81        public void decode(FacesContext context){
82        }
83
84//**************************************//
85// AUTORISE LES TAGS ENFANTS
86//**************************************//
87        public boolean getRendersChildren() {
88                return true;
89        }
90
91//**************************************//
92//FAMILLE DU COMPOSANT
93//**************************************//
94        public String getFamily() {
95                return "ComposantPerso";
96        }
97       
98                       
99}
100       
101       
102
Note: See TracBrowser for help on using the repository browser.