| 12
 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
 
 | <!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:p="http://primefaces.org/ui">
 
    <ui:composition template="/Views/Template/common.xhtml">
    <ui:define name="Edition">
    <h:form id="form">
        <p:growl id="msgs" />
        <p:panel header="Nouveau">
            <h:panelGrid columns="2" id="grid">
            <h:outputLabel value="ID : *" for="txt_id" />
                <p:inputText id="txt_id" value="#{typeCarburantBean.typeCarburant.idCarburant}"
                    required="true" />
                <h:outputLabel value="Libelle : *" for="txt_lib" />
                <p:inputText id="txt_lib" value="#{typeCarburantBean.typeCarburant.libelle}"
                    required="true" />
 
                <h:outputLabel value="prix : *" for="txt_prix" />
                <p:inputText id="txt_prix" required="true"
                    value="#{typeCarburantBean.typeCarburant.prixLitre}" />
 
                 <p:commandButton value="Reset" type="reset" />
                <p:commandButton id="btn_add" value="AJOUT"
                    action="#{typeCarburantBean.addTypeCarburant}" />
            </h:panelGrid>
        </p:panel>
    </h:form>
    </ui:define>
    <ui:define name="Consultation">
 
     <h:form id="AjoutP">
            <p:commandButton value="Ajouter un Vehicule" icon="ui-icon-adds"   onclick="CarburantAjout.show()"/>
        </h:form>
                <h:form id="edit">
 
            <p:dialog header="Ajout un Vehicule" widgetVar="CarburantAjout" resizable="true" id="editP" >
 <p:growl id="growl" showDetail="true" sticky="false" />
 
                <h:panelGrid id="display" columns="2" cellpadding="4" style="margin:0 auto;">
 
 
                    <f:facet name="header">
                        <h:outputLabel value="bonjour"/>
                    </f:facet>
 
 
 
                    <h:outputLabel for="id" title="id" value="id:" style="color: crimson;" />
                    <h:inputText value="#{typeCarburantBean.typeCarburant.idCarburant}"  id="id" required="true"/>
                    <h:outputLabel for="libelle"  value="libelle:" style="color: crimson;"/>
                    <h:inputText value="#{typeCarburantBean.typeCarburant.libelle}"  id="libelle" required="true"/>
                    <h:outputLabel for="prix" title="prix" value="prix" style="color: crimson;"/>
 
                    <h:inputText value="#{typeCarburantBean.typeCarburant.prixLitre}"   id="prix" required="true"/>
 
                </h:panelGrid>
                <p:separator/>
                <p:commandButton value="Enregistrer" actionListener="#{typeCarburantBean.addTypeCarburant}"  oncomplete="CarburantAjout.hide()"  />
            </p:dialog>
            </h:form>
     <h:form id="tbb"> 
 
 
              <p:outputPanel>  
                   <h:outputText value="Search:" style="Height:30px"/>  
                   <p:inputText id="globalFilter" onkeyup="TypeCarburant.filter()" style="width:150px" />  
              </p:outputPanel>  
        <p:dataTable id="dataTable" var="typeCarburant" value="#{typeCarburantBean.alltype}" sortMode="single" rows="5" paginator="true">    
 
            <p:column sortBy="#{typeCarburant.idCarburant}" headerText="ID" >  
                <h:outputText value="#{typeCarburant.idCarburant}" />  
            </p:column>  
 
            <p:column sortBy="#{typeCarburant.libelle}" headerText="Libelle">  
                <h:outputText value="#{typeCarburant.libelle}" />  
            </p:column>  
 
            <p:column sortBy="#{typeCarburant.prixLitre}" headerText="prix par litre">  
                <h:outputText value="#{typeCarburant.prixLitre}" />  
            </p:column> 
 
        </p:dataTable>  
 
    </h:form>  
    </ui:define>
 
    </ui:composition>
</html> | 
Partager