bonjour
j'utilse struts layout pour afficher un treeview dans ma jsp, je le construi dans une action puis je l'appel depuis ma jsp.
voici comment je construit mon treeview dans l'action.
le probleme est le suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 MenuComponent menuChefP = new MenuComponent(); menuChefP.setName("chefProjmenu"); MenuComponent menuGestProj = new mnuComponent();menuGestProj.setTitle("Gestion Projets"); MenuComponent menuCreaProj = new MenuComponent(); menuCreaProj.setTitle("Créer Projet"); MenuComponent menuInfoProj = new MenuComponent(); menuInfoProj.setTitle("Information general"); menuInfoProj.setLocation("afficherAjouterProjet.do"); MenuComponent menuRentabProj = new MenuComponent(); menuRentabProj.setTitle("Etude rentabilité"); menuRentabProj.setLocation("etudeRentab.do?reqCode=initRentab"); menuCreaProj.addMenuComponent(menuInfoProj); menuCreaProj.addMenuComponent(menuRentabProj); menuGestProj.addMenuComponent(menuCreaProj); menuChefP.addMenuComponent(menuGestProj); MenuRepository rep = new MenuRepository(); rep.addMenu(menuChefP); if(request.getSession().getAttribute(MenuRepository.MENU_REPOSITORY_KEY)==null){ request.getSession().setAttribute(MenuRepository.MENU_REPOSITORY_KEY, rep); } else{((MenuRepository)request.getSession().getAttribute(MenuRepository.MENU_REPOSITORY_KEY)).addMenu(menuChefP); }
au premier affichage de la jsp en cliquant sur un lien du treeview il me dirige vers l'action desiré, ensuite le second click sur n'importe quel lien du treeview genere le probleme suivant
je pense que le pb est générer par la protion de code :Rapport d'état
message:Invalid path /form/etudeRentab was requested
description La ressource demandée (Invalid path /form/etudeRentab was requested) n'est pas disponible.
meme en ajoutant cela le pb persiste:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 menuRentabProj.setLocation("etudeRentab.do?reqCode=initRentab");
est ce que quelqu'un peut m'aider. je ne sait pas quoi faire?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 menuRentabProj.setAction("etudeRentab.do?reqCode=initRentab"); menuRentabProj.setLocation("etudeRentab.do?reqCode=initRentab"); menuRentabProj.setForward("etudeRentab.do?reqCode=initRentab");
merci d'avance
Partager