Advertisement
Guest User

Untitled

a guest
Mar 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.82 KB | None | 0 0
  1. <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  2.                xmlns:ui="http://java.sun.com/jsf/facelets"
  3.                xmlns:h="http://java.sun.com/jsf/html"
  4.                xmlns:f="http://java.sun.com/jsf/core"
  5.                xmlns:p="http://primefaces.org/ui"
  6.                template="/WEB-INF/template.xhtml">
  7.  
  8.     <ui:define name="title">Model des Véhicules</ui:define>
  9.  
  10.  
  11.     <ui:define name="content">
  12.      <h:form>
  13.     <p:panel id="panel" header="Ajouter un modèle">
  14.  
  15.         <p:messages id="msgs" />
  16.  
  17.         <h:panelGrid columns="3" cellpadding="5">
  18.            
  19.             <p:outputLabel for="NomModel" value="Modèle" />
  20.             <p:inputText id="NomModel" value="#{beanModel.nomModel}" required="true" label="Nom d'utilisateur" >
  21.                 <f:validateLength minimum="2" />
  22.             </p:inputText>
  23.             <p:message for="NomModel" display="icon" />
  24.             <p:commandButton value="Ajouter" update="panel" actionListener="#{beanModel.addmodel}" icon="ui-icon-check" ajax="true"/>
  25.              
  26.         </h:panelGrid>
  27.        
  28.     </p:panel>
  29.     </h:form>
  30.         <p:dataTable id="tabMod" var="modelV" value="#{beanModel.listmodels}">
  31.        
  32.           <p:column headerText="#">
  33.             <h:outputText value="#{modelV.idModel}"/>
  34.           </p:column>
  35.          
  36.           <p:column headerText="Modèles">
  37.             <h:outputText value="#{modelV.modelNom}"/>
  38.           </p:column>
  39.          
  40.              <p:column headerText="Actions">
  41.              <h:form id="f2">
  42.              <p:commandButton id="editButton" value="Modifier" icon="fa fa-fw fa-edit" title="Modifier"/>
  43.              <p:commandButton value="Supprimer" icon="fa fa-fw fa-remove" actionListener="#{beanModel.removemodel(modelV)}" update="tabMod" ajax="true"/>
  44.              </h:form>
  45.           </p:column>
  46.          
  47.         </p:dataTable>
  48.  
  49.  
  50.        
  51.  
  52.  
  53.  
  54.  
  55.  
  56.     </ui:define>
  57.    
  58.  
  59. </ui:composition>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement