1
0
Fork 0

Fix menu button?

This commit is contained in:
Ziedelth 2022-06-29 19:47:46 +02:00
parent c3975ab084
commit 78fc588327
4 changed files with 21 additions and 11 deletions

View file

@ -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

View file

@ -2,12 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/Product.hbm.xml</file>
<file>file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/menu.jsp</file>
<file>file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/resultat.jsp</file>
<file>file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/controller/BddController.java</file>
<file>file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/MagasinHelper.java</file>
</group>
<group/>
</open-files>
</project-private>

View file

@ -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);