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
| public void encodeEnd(FacesContext facesContext) throws IOException {
String style = new String ();
ResponseWriter responseWriter = facesContext.getResponseWriter();
// Encode le contrôle page suivante
responseWriter.startElement("div", this);
responseWriter.writeAttribute("class", "leftCol clearfix", "class");
responseWriter.writeAttribute("id", "metaNav", "id");
responseWriter.startElement("div", this);
responseWriter.writeAttribute("class", "leftColInner rightFloat", "class");
responseWriter.startElement("ul", this);
responseWriter.writeAttribute("class", "langNav horizontal clearfix", "class");
// NL
responseWriter.startElement("li", this);
style = "first";
if (this.util.isLangNL()) {
style = style + " active";
}
responseWriter.writeAttribute("class", style, "class");
responseWriter.startElement("a", this);
responseWriter.writeAttribute("href", "#" , "href");
responseWriter.writeAttribute("title", "Nederlands" , "title");
responseWriter.writeAttribute("lang", "nl" , "lang");
responseWriter.write("nl");
responseWriter.endElement("a");
responseWriter.endElement("li");
// FR
responseWriter.startElement("li", this);
style = "";
if (this.util.isLangFR()) {
style = style + " active";
}
responseWriter.writeAttribute("class", style, "class");
responseWriter.startElement("a", this);
responseWriter.writeAttribute("href", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{util.langFR}").getValue(facesContext) , "href");
responseWriter.writeAttribute("title", "Français" , "title");
responseWriter.writeAttribute("lang", "fr" , "lang");
responseWriter.write("fr");
responseWriter.endElement("a");
responseWriter.endElement("li");
// EN
responseWriter.startElement("li", this);
style = "last";
if (this.util.isLangEN()) {
style = style + " active";
}
responseWriter.writeAttribute("class", style, "class");
responseWriter.startElement("a", this);
responseWriter.writeAttribute("href", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{util.langEN}").getValue(facesContext) , "href");
responseWriter.writeAttribute("title", "English" , "title");
responseWriter.writeAttribute("lang", "en" , "lang");
responseWriter.write("en");
responseWriter.endElement("a");
responseWriter.endElement("li");
responseWriter.endElement("ul");
responseWriter.endElement("div");
responseWriter.endElement("div");
} |
Partager