diff --git a/build/web/WEB-INF/classes/controller/BddController.class b/build/web/WEB-INF/classes/controller/BddController.class index d297444..537f2b4 100644 Binary files a/build/web/WEB-INF/classes/controller/BddController.class and b/build/web/WEB-INF/classes/controller/BddController.class differ diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index d0f43c9..5518af6 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,10 +1,10 @@ -deploy.ant.properties.file=C:\\Users\\flifloo\\AppData\\Roaming\\NetBeans\\8.1\\config\\GlassFishEE6\\Properties\\gfv3-1956436209.properties +deploy.ant.properties.file=C:\\Users\\watte\\AppData\\Roaming\\NetBeans\\8.1\\config\\GlassFishEE6\\Properties\\gfv3-1388137795.properties j2ee.platform.is.jsr109=true -j2ee.server.domain=C:/Users/flifloo/AppData/Roaming/NetBeans/8.1/config/GF_4.1.1/domain1 +j2ee.server.domain=C:/Users/watte/AppData/Roaming/NetBeans/8.1/config/GF_4.1.1/domain1 j2ee.server.home=C:/Program Files/glassfish-4.1.1/glassfish j2ee.server.instance=[C:\\Program Files\\glassfish-4.1.1\\glassfish;C:\\Program Files\\glassfish-4.1.1\\glassfish\\domains\\domain1]deployer:gfv3ee6wc:localhost:4848 j2ee.server.middleware=C:/Program Files/glassfish-4.1.1 javac.debug=true javadoc.preview=true selected.browser=Chrome -user.properties.file=C:\\Users\\flifloo\\AppData\\Roaming\\NetBeans\\8.1\\build.properties +user.properties.file=C:\\Users\\watte\\AppData\\Roaming\\NetBeans\\8.1\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index e9dbd15..6807a2b 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -2,12 +2,6 @@ - - file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/Product.hbm.xml - file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/menu.jsp - file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/resultat.jsp - file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/controller/BddController.java - file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/MagasinHelper.java - + diff --git a/src/java/controller/BddController.java b/src/java/controller/BddController.java index 1ead67a..a0913de 100644 --- a/src/java/controller/BddController.java +++ b/src/java/controller/BddController.java @@ -62,7 +62,7 @@ public class BddController extends MultiActionController { public ModelAndView list(HttpServletRequest request, HttpServletResponse response) throws Exception { sessionInit(request); - String type = request.getParameter("type"); + String type = request.getAttribute("type").toString(); ModelAndView mv = new ModelAndView("resultat"); mv.addObject("user",session.getAttribute("user")); mv.addObject("type", type); @@ -90,6 +90,22 @@ public class BddController extends MultiActionController { return mv; } + + public ModelAndView purchase(HttpServletRequest request, HttpServletResponse response) throws Exception { + request.setAttribute("type", "purchase"); + return list(request, response); + } + + public ModelAndView product(HttpServletRequest request, HttpServletResponse response) throws Exception { + request.setAttribute("type", "product"); + return list(request, response); + } + + public ModelAndView customer(HttpServletRequest request, HttpServletResponse response) throws Exception { + request.setAttribute("type", "customer"); + return list(request, response); + } + public ModelAndView add(HttpServletRequest request, HttpServletResponse response) throws Exception { sessionInit(request);