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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
|
<!-- Imports nécessaires -->
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@ taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="css.css" />
<!-- Titre en haut de la page -->
<title>THOT : Insérer un nouveau projet dans la base</title>
</head>
<body>
<f:view>
<!-- L'en-tête -->
<div id="logoThales" ></div>
<div id="entete">
<strong class="important">TH</strong>alès <strong class="important">O</strong>util de sous-<strong class="important">T</strong>raitance <img src="img/thot.jpg" style="position:absolute;top:5px;left:1050px;" width=35 height=7%>
</div>
<!-- Partie connexion avec la date -->
<div id="connexion">
<h:form>
<strong><h:outputText value="#{connexionBean.utilisateur.nom}" /><rich:spacer width="5" /><h:outputText value="#{connexionBean.utilisateur.prenom}" /> | <h:outputLink value="modifierCompte.jsf"><h:outputText value="Compte" /></h:outputLink> | <h:commandLink action="#{connexionBean.deconnexion}" immediate="true" value="Déconnexion" />| <script type="text/javascript" src="date.js"></script></strong>
</h:form>
</div>
<!-- Les menus -->
<div id="menu">
<f:subview id="menuSub">
<%@include file="menu.jsp" %>
</f:subview>
</div>
<!-- Le corps -->
<div id="action">
</div>
<div id="corps">
<div id="Creerprojet">
<!-- Titre de la page -->
<h2>Insérer un nouveau projet</h2>
<!-- Espace de 20px entre le titre et le formulaire -->
<rich:spacer height="20px" />
<!-- Début du formulaire -->
<h:form id="creerModifierForm">
<!--<rich:panel header=" " style="width:430px;background-color:#d0d0d0;">-->
<!-- Petit panel de 4 colonnes où dans chaque colonne est placé un composant -->
<h:panelGrid columns="4" >
<h:outputLabel >
<font><h:outputText value="Affaire liée :"/></font>
</h:outputLabel>
<!-- Choisir une affaire dans la liste déroulante -->
<h:selectOneMenu id="affaireLier" value="#{projetBean.idAffaire}" >
<f:selectItems value="#{projetBean.listAffaire}" />
<a4j:support event="onchange" actionListener="#{projetBean.affaireByID}" reRender="projet" />
</h:selectOneMenu>
<!-- Permet l'aller à la page pour enregistrer un projet si celui-ci n'est pas dans la liste déroulante -->
<h:outputLabel><font><h:outputText value="Enregistrer une nouvelle affaire : "/></font></h:outputLabel>
<input type="button" name="lienaffaire" value="Enregistrer une nouvelle affaire" onclick="self.location.href='creerAffaire.jsf'" style="background-color:#ff9900" style="color:white; font-weight:bold">
</h:panelGrid>
<!-- Fin petit panel -->
<!-- Petit panel de 2 colonnes où dans chaque colonne est placé un composant -->
<h:panelGrid columns="2" >
<h:outputLabel><font><h:outputText value="Liste de tous les projets existant déjà : "/></font></h:outputLabel>
<h:selectOneMenu id="projet" value="#{projetBean.idProjet}" >
<f:selectItem itemValue="0" itemLabel="Projets déjà liée à cette affaire"/>
<f:selectItems value="#{projetBean.listProjettrie}"/>
</h:selectOneMenu>
<h:outputLabel >
<font><h:outputText value="Nom du projet :"/></font>
</h:outputLabel>
<h:panelGrid columns="2" >
<h:inputText id="projetNom" value="#{projetBean.projet.nomprojet}" required="true" requiredMessage="Saisir une valeur"/>
<h:message style="color: red; text-decoration: none;" id="projetNomError" for="projetNom"/>
</h:panelGrid>
<h:outputLabel >
<font><h:outputText value="Entite : "/></font>
</h:outputLabel>
<h:selectOneMenu id="projetentite" value="#{projetBean.entite}" >
<f:selectItems value="#{projetBean.listEntite}" />
</h:selectOneMenu>
</h:panelGrid>
<!-- Fin petit panel -->
<!-- Espace de 50px entre le formulaire et le message qui confirme l'insertion-->
<rich:spacer height="50" />
<!-- Message d'erreur en cas de problème ou de confirmation d'insertion du produit -->
<h:message style="color: green; text-decoration: none;margin-left:100px;" id="registerError" for="cBValider"/><br />
<!-- Espace de 50px entre le message qui confirme l'insertion et les boutons -->
<rich:spacer height="50" />
<h:panelGroup style="margin-left:100px;">
<h:commandButton id="cBValider" action="#{projetBean.valider}" value="Valider" /><rich:spacer width="10px" />
<!--<h:commandButton id="cBRetour" action="#{projetBean.retour}" immediate="true" value="Retour" /><rich:spacer width="10px" />-->
<a4j:commandButton action="#{projetBean.annuler}" value="Annuler" reRender="creerModifierForm"/><rich:spacer width="10px" />
</h:panelGroup>
<!--</rich:panel>-->
</h:form>
<!-- 50 px d'espace entre les boutons et la barre de fin -->
<rich:spacer height="50" />
</div>
</div>
<div id="footer">
<hr />
</div>
</f:view>
</body>
</html> |
Partager