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
<ui:composition template="/template/template.xhtml">
	<ui:define name="title">
 
	</ui:define>
	<ui:define name="body">
<h:form>
<p:panel
    style=" border-style: solid; border-left: 0px;border-right: 0px; border-top: 0px;background-image: none; ">
 
    <f:facet name="header">
          <center><font color="yellow"  size="3">Liste des Familles</font></center> 
        </f:facet>
 
   <p:growl id="messages" showDetail="true"/>  
 
 <p:dataTable value="#{familleBean.listFamille}" var="car" id="table" paginator="true" rows="10"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="5,10,15">
                  <p:outputPanel>  
                <h:outputText value="Search all fields:" />  
                <p:inputText id="globalFilter" onkeyup="listFamille.filter()" style="width:150px" />  
            </p:outputPanel>  
 
 
 
                 <p:column filterBy="#{car.faCodeFamille}"
                headerText="Model" footerText="contains "  filterMatchMode="contains" >
                    <f:facet name="header">
                        <h:outputText value="codeFamille" />
                    </f:facet>
                    <h:outputText value="#{car.faCodeFamille}" />
                </p:column>
                  <p:column filterBy="#{car.faIntitule}"
                headerText="Model" footerText="contains "  filterMatchMode="contains" >
                    <f:facet name="header">
                        <h:outputText value="Intitule" />
                    </f:facet>
                    <h:outputText value="#{car.faIntitule}" />
                </p:column>
 
 
                 <p:column >
                    <f:facet name="header">
							supprimer
                    </f:facet>
 
		                <p:commandButton id="selectButton" oncomplete="confirmation.show()"  icon="ui-icon-trash" title="supprimer" ajax="true">
 
		                      <f:setPropertyActionListener value="#{car.faCodeFamille}" target="#{familleBean.code}" />
		                       <f:param value="#{car.faCodeFamille}" id="cdf"/> 
</p:commandButton>
 
		                </p:column> 
		                 <p:column >
                    <f:facet name="header">
						modifier
                    </f:facet>
 
		                <p:commandButton id="selectButton2" oncomplete="editPane.show()"  icon="ui-icon-arrowrefresh-1-w" title="modifier">
 
		                         <f:setPropertyActionListener value="#{car.faCodeFamille}" target="#{familleBean.code}" /> 
		                      <f:setPropertyActionListener value="#{car.faIntitule}" target="#{familleBean.intitule}" /> 
 
 
</p:commandButton>
 
		                </p:column>          
               </p:dataTable>
</p:panel>
<p:dialog id="confirmDialog" message="Supp Famille"  
                header="vous étes sur de supprimer ce famille?" severity="alert" widgetVar="confirmation">  
      <p:commandButton id="confirm" value="Yes Sure"  ajax="false" update="messages" oncomplete="confirmation.hide()"  
                   action="#{familleBean.delete}"/>  
        <p:commandButton id="decline" value="Not Yet" onclick="confirmation.hide()" type="button" />   
 
    </p:dialog> 
     <p:dialog id="editPane" message="Modifier Famille"  
                header="Modifier Famille" severity="alert" widgetVar="editPane">  
                   <h:panelGrid columns="2" id="editGrid">
 
                <h:outputText value="codeFamille:" />
				<h:inputText label="code" id="code" required="true"
					value="#{familleBean.code}">
					<f:validateLength maximum="10" />
				</h:inputText>
 
				<h:outputText value="Intitulé de la famille :" />
				<h:inputText label="intitule" id="intitule" required="true"
					value="#{familleBean.intitule}">
					<f:validateLength maximum="35" />
				</h:inputText>
 
 
 
            <h:panelGroup />
            </h:panelGrid>
        <p:commandButton id="edit" value="Yes Sure" update="messages table editGrid " ajax="true" oncomplete="editPane.hide()"  
                   action="#{familleBean.modifier}"/>  
        <p:commandButton id="decl" value="Not Yet" onclick="editPane.hide()" type="button" />   
 
    </p:dialog> 
 
 
</h:form>
 
 
	</ui:define>
</ui:composition>
</html>