Salut,
J'ai creé un composant bouton radio personnalisé.
je l'ai utilisé dans une page jsp et il a bien marché tandis que dans une page xhtml le composant ne s'affiche pas.
je ne vois pas le problème!!!!!
voici le code de la page tld:Voici celui de la page xhtml!!!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <!-- ============== Tag Library Description Elements ============= --> <tlib-version>0.03</tlib-version> <jsp-version>1.2</jsp-version> <short-name>Custom JavaServerFaces Framework Tag Library</short-name> <uri>http://www.srijeeb.com/jsf/tags-html</uri> <tag> <name>radioButton</name> <tag-class>com.srijeeb.jsf.tags.HTMLCustomSelectOneRadioTag</tag-class> <body-content>empty</body-content> <attribute> <name>name</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>overrideName</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>id</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>styleClass</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>style</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>disabled</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>Boolean</type> </attribute> <attribute> <name>itemLabel</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>itemValue</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>onClick</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>onMouseOver</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>onMouseOut</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>onFocus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>onBlur</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> </tag> </taglib>
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:custom="/WEB-INF/my_custom_tags.tld"> <ui:composition > <f:view> <h:form id="testRadioForm"> <h:dataTable id="mySampleTable3" value="#{myBackingBean.sampleTable3}" headerClass="tableHeaderStyle" columnClasses="columnNameStyle,columnExcellentStyle,columnGoodStyle,columnAverageStyle,columnPoorStyle" var="item" width="100%" border="1" first="0"> <f:facet name="header"> <h:panelGrid id="gridHeader3" columns="1" width="100%" > <h:outputText id="outputText3" value="Radios grouped in row(With our custom tag)"></h:outputText> </h:panelGrid> </f:facet> <h:column> <f:facet name="header"> <h:outputText value="Emp Name" /> </f:facet> <h:outputText id="empName" value="#{item.empName}"/> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Excellent" /> </f:facet> <custom:radioButton id="myRadioId2" name="myRadioRow" value="#{item.radAns}" itemValue="E" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Good" /> </f:facet> <custom:radioButton id="myRadioId3" name="myRadioRow" value="#{item.radAns}" itemValue="G" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Average" /> </f:facet> <custom:radioButton id="myRadioId4" name="myRadioRow" value="#{item.radAns}" itemValue="A" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Poor" /> </f:facet> <custom:radioButton id="myRadioId5" name="myRadioRow" value="#{item.radAns}" itemValue="P" /> </h:column> </h:dataTable> <h:panelGrid id="buttonGrid" columns="1" width="100%"> <h:commandButton id="btnTest" action="#{myBackingBean.executeTest}" value="Test It"/> </h:panelGrid> <rich:separator/> <h:panelGrid id="resultGridHeader" columns="1" width="100%"> <h:outputText value="RESULT"></h:outputText> </h:panelGrid> <rich:separator/> <h:panelGrid id="resultGrid2" columns="1" width="100%"> <h:outputText value="#{myBackingBean.resultOfSecondTable}"></h:outputText> </h:panelGrid> </h:form> </f:view> </ui:composition> </html>
Est ce que quelqu'un a une idée.
Merci d'avance!!!!!
Partager