helloworld:web:java:taglib:jsf
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
helloworld:web:java:taglib:jsf [2015/08/14 00:30] – Suppression d'une classe inutile root | helloworld:web:java:taglib:jsf [2020/05/10 23:56] (Version actuelle) – Suppression de la taille par défaut pour les images root | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Nécessite un projet de type [[eclipse:howto:dwp|Dynamic Web Project]] avec les '' | + | Nécessite un projet de type [[ide:eclipse:projet|Dynamic Web Project]] avec les '' |
- | + | ||
- | <file xml faces-config.xml> | + | |
- | <?xml version=" | + | |
- | < | + | |
- | xmlns: | + | |
- | xsi: | + | |
- | version=" | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | < | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
- | </ | + | |
+ | =====component + renderer===== | ||
<file java TagHeureRenderer.java> | <file java TagHeureRenderer.java> | ||
package com.llgc; | package com.llgc; | ||
Ligne 35: | Ligne 13: | ||
import javax.faces.render.Renderer; | import javax.faces.render.Renderer; | ||
+ | @FacesRenderer (componentFamily=" | ||
public class TagHeureRenderer extends Renderer | public class TagHeureRenderer extends Renderer | ||
{ | { | ||
Ligne 61: | Ligne 40: | ||
import javax.faces.context.ResponseWriter; | import javax.faces.context.ResponseWriter; | ||
+ | @FacesComponent (" | ||
public class TagHeureHtml extends HtmlOutputText | public class TagHeureHtml extends HtmlOutputText | ||
{ | { | ||
Ligne 67: | Ligne 47: | ||
public String getFamily () | public String getFamily () | ||
{ | { | ||
- | // Le nom du rendu du composant correspond avec celui défini dans le fichier faces-config.xml, | + | |
- | // rubrique render-kit|renderer|component-family | + | return "com.llgc.heureCourante"; |
- | return " | + | |
} | } | ||
Ligne 76: | Ligne 55: | ||
{ | { | ||
ResponseWriter out = context.getResponseWriter (); | ResponseWriter out = context.getResponseWriter (); | ||
- | out.write ("</ | + | out.write ("<br />" |
super.encodeEnd (context); | super.encodeEnd (context); | ||
} | } | ||
Ligne 90: | Ligne 69: | ||
< | < | ||
< | < | ||
- | < | + | < |
</ | </ | ||
</ | </ | ||
Ligne 105: | Ligne 84: | ||
< | < | ||
< | < | ||
- | < | + | < |
- | < | + | < |
</ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
</ | </ | ||
</ | </ | ||
Ligne 125: | Ligne 108: | ||
</ | </ | ||
< | < | ||
- | | + | < |
- | | + | |
- | </p> | + | |
</ | </ | ||
</ | </ | ||
Ligne 134: | Ligne 115: | ||
Rendu : | Rendu : | ||
- | {{: | + | {{: |
+ | |||
+ | =====Source XHTML===== | ||
+ | Volé (et actualisé) depuis [[http:// | ||
+ | |||
+ | <file xml taglibsource.xhtml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | <html xmlns=" | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | < | ||
+ | < | ||
+ | <table border=" | ||
+ | <tr bgcolor=" | ||
+ | < | ||
+ | <font color=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <file xml tagheure2.taglib.xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xsi: | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <file xml web.xml> | ||
+ | <?xml version=" | ||
+ | <web-app xmlns: | ||
+ | xmlns=" | ||
+ | xsi: | ||
+ | version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | Il est possible de spécifier plusieurs '' | ||
+ | </ | ||
+ | |||
+ | <file xml taglib2.xhtml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | <html xmlns=" | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | xmlns: | ||
+ | < | ||
+ | <meta http-equiv=" | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | Rendu : | ||
+ | {{: | ||
+ | |||
+ | =====Ajout d'un validateur des attributs===== | ||
+ | En '' | ||
+ | |||
+ | La seule solution que j'ai trouvé pour avoir un comportement similaire à '' |
helloworld/web/java/taglib/jsf.1439505042.txt.gz · Dernière modification : 2015/08/14 00:30 de root