<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page import="com.fenalco.utilities.lists.ShoppingListView" %>
<%@ page import="com.fenalco.entities.ShoppingListProduct" %>
<html>
<head>
    <link rel='stylesheet' style='text/css' href='../css/tablas.css'>
    <title>JSP Page</title>
</head>
<body>

<%
ShoppingListView view = (ShoppingListView)request.getAttribute("view");
%>
<table width='280' align='left'>
<tr>
    <td>
        <%
            String tittle = "Lista de Compra";
        %>
        <%@ include file="/titulo.jsp" %>

    </td>
</tr>

<tr>
    <td colspan='2' align='left'><b>Nombre </b> <%=view.getName()%></td>
</tr>
<tr>
    <td colspan='2'><b>Productos</b></td>
</tr>
<tr>
    <td colspan='2'><hr></td>
</tr>
<tr>
    <td colspan='2'>
        <table align="left">
                <tr class='tableheader'>
                    <!-- Encabezado del listado -->
                    <td align="center"><b>C&oacute;digo</b></td>
                    <td align="center"><b>Nombre</b></td>
                    <td align="center"><b>Proveedor</b></td>
                    <td align="center"><b>Cantidad</b></td>

                    </tr>
                    <% 
                    
                    Object data = new Object();
                    if(view != null)
                    {
                        while(view.move()){
                            int i = 0;
                    %>
                <tr>
                            <% while((data=view.nextElement()) != null){

                                    i++;
                                    if(i!=1){
                            %>              
                                 <td><%= data.toString() %></td>
                            <%
                                    }
                                }
                            %>
                                <!-- Columnas para las opciones -->

                </tr>
                    <% } 
                    }%>

            </table>
    </td>
</tr>


</table>
<table width="760">
	<tr>
		<td><%@ include file="/piepagina.jsp" %></td>
	</tr>
</table>
</body>
</html>
