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
| <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@page import="com.pfe.struts.forms.MonPanierForm"%>
<%@page import="com.pfe.beans.entity.Image"%>
<%@page import="com.pfe.beans.entity.TypeArticle"%>
<%@page import="com.pfe.beans.entity.Contenu"%>
<%
Object personne = request.getSession().getAttribute("Personne");
%>
<%@page import="com.pfe.beans.entity.Client"%><html>
<head>
<title>Struts Form for articleForm</title>
<style type="text/css">
<!--
body {
background-color: #BBE3F7;
}
-->
</style>
</head>
<body>
<jsp:include page="/pages/includeMenu.jsp"/>
<html:form action="<%=request.getContextPath()%>/monPanier">
<html:hidden property="idArticle"/>
<html:hidden property="idArticle"/>
<table>
<tr>
<logic:present name="Errors">
<logic:notEmpty name="Errors">
Erreur
</logic:notEmpty>
</logic:present>
</tr>
</table>
<br/>
<br/>
<table>
<tr>
<th>Article</th>
<th>Prix</th>
<th>Quantité</th>
<th>Prix Total</th>
</tr>
<logic:notEmpty id="thisArticle" name="listeContenusPanier">
<logic:iterate id="thisArticle" name="listeContenusPanier" type="Contenu">
<tr>
<% if (personne instanceof Client) {%>
<td><a href="<%=request.getContextPath()%>/article"><%=((Contenu) thisArticle).getArticle().getPhraseLibelle().getTraduction() %></a></td>
<% } else { %>
<td><a href="<%=request.getContextPath()%>/modifierArticle"><%=((Contenu) thisArticle).getArticle().getPhraseLibelle().getTraduction() %></a></td>
<% } %>
<td><%=thisArticle.getArticle().getPriceHt().toString() %></td>
<td><%=thisArticle.getQuantite().toString() %></td>
<td><%=thisArticle.getArticle().getPriceHt().doubleValue() * ((Contenu) thisArticle).getQuantite().intValue() %></td>
</tr>
</logic:iterate>
</logic:notEmpty>
<logic:empty name="monPanierForm" property="listeArticles">
<tr>
<tr colspan="2">Panier vide.</td>
</tr>
</logic:empty>
</table>
</html:form>
</body>
</html> |
Partager