Bonsoir à tous,
Je souhaiterai afficher une popup m'affichant les types de moyens associés à un moyen.
Le problème, c'est que j'ai le message d'erreur indiqué dans le titre ci-dessous. Apparemment, si j'ai bien compris, il ne me trouve pas le bean associé à cette variable.
J'ai beau cherché dans la jsp, le formulaire et dans struts-config.xml, je ne vois pas l'erreur. Les variables utilisées ont l'air d'être les mêmes partout.
Pour plus de clarté, voici le code de ma jsp :
celui de mon formulaire :
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
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 <html:form action="<%=action%>" onsubmit="return submitPage1();"> <html:hidden property="typTmId" value="<%=typeMoyenId%>"></html:hidden> <html:hidden property="timeId" value="<%=sdf2.format(date)%>"></html:hidden> <table border="1" width="500" cellpadding="3" cellspacing="0" bordercolor="#AABFFF"> <tr> <!-- Traitement des code, libelle et commentaire --> <td>CODE</td> <%if ((moyenFixeTO!=null) && (moyenFixeTO.getMfCode()!=null)) { if (moyenFixeTO.getMfId()!=null) { %> <td><html:text name="mfCode" size="20" maxlength="20" onfocus="focusOnInput()" onblur="focusOutInput()" property="mfCode" value="<%=moyenFixeTO.getMfCode()%>"/> <html:errors property="mfCode"/> </td> <%} else { %> <td align="left"><input type="text" class="zoneSaisiRO" readonly="readonly" name="mfCode" value="<%=moyenFixeTO.getMfCode()%>"/> <html:hidden property="mfCode" value="<%=moyenFixeTO.getMfCode()%>"></html:hidden> <% } }else{ %> <td><html:text name="mfCode" size="20" maxlength="20" onfocus="focusOnInput()" onblur="focusOutInput()" property="mfCode"/> <html:errors property="mfCode"/> </td> <%} %> </tr> <tr> <td>LIBELLE</td> <%if ((moyenFixeTO!=null) && (moyenFixeTO.getMfLibelle()!=null)) { %> <td><html:text name="mfLibelle" size="20" maxlength="80" onfocus="focusOnInput()" onblur="focusOutInput()"property="mfLibelle" value="<%=moyenFixeTO.getMfLibelle()%>"/> <html:errors property="mfLibelle"/> </td> <%}else{ %> <td><html:text name="mfLibelle" size="20" maxlength="80" onfocus="focusOnInput()" onblur="focusOutInput()"property="mfLibelle"/> <html:errors property="mfLibelle"/> </td> <%} %> </tr> <tr> <td>COMMENTAIRE</td> <%if ((moyenFixeTO!=null) && (moyenFixeTO.getMfComment()!=null)) { %> <td><html:textarea name="mfComment" onfocus="focusOnInput()" onblur="focusOutInput()" cols="20" rows="15" property="mfComment" value="<%=moyenFixeTO.getMfComment()%>"/> <html:errors property="mfComment"/> </td> <%}else{ %> <td><html:textarea name="mfComment" onfocus="focusOnInput()" onblur="focusOutInput()" cols="20" rows="15" property="mfComment"/> <html:errors property="mfComment"/> </td> <%} %> </tr> </table> <table border="0" align="center"> <tr> <td><input type="image" src="<% if ((moyenFixeTO==null) || (moyenFixeTO.getMfId()==0)) {%>images/btAjout.jpg<%} else {%>images/btModifier.jpg<%}%>" class="shadeInput"></td> <td><a href="#" onclick="javascript:window.close()"><img border="0" src="images/btAnnuler.jpg"/></a></td> </tr> </table> </html:form>
et enfin pour finir, mon struts-config
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
26
27
28
29
30
31
32
33
34
35
36
37 public class MoyenFixePopupForm extends ActionForm { /** * */ private static final long serialVersionUID = 1L; private String mfId="";//Id de moyen fixe private String mfCode=""; private String mfLibelle=""; private String mfComment=""; public String getMfCode() { return mfCode; } public void setMfCode(String mfCode) { this.mfCode = mfCode; } public String getMfComment() { return mfComment; } public void setMfComment(String mfComment) { this.mfComment = mfComment; } public String getMfLibelle() { return mfLibelle; } public void setMfLibelle(String mfLibelle) { this.mfLibelle = mfLibelle; } public String getMfId() { return mfId; } public void setMfId(String mfId) { this.mfId = mfId; } ....
j'ai bien cherché sur le forum si quelqu'un avait le même problème que moi, mais apparemment, ce n'est pas vraiment le cas.
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 <form-bean name="moyenFixePopupForm" type="logistique.forms.MoyenFixePopupForm"> </form-bean> <action path="/MoyenFixePopupAction" type="org.springframework.web.struts.DelegatingActionProxy" name="moyenFixePopupForm" input="/WEB-INF/jsp/logistique/AddMoyenFixePopup.jsp" scope="request" parameter="methode" validate="false"> <forward name="displayPage" path="/WEB-INF/jsp/logistique/AddMoyenFixePopup.jsp"></forward> <forward name="succes" path="/WEB-INF/jsp/void.jsp"></forward> </action>
J'espère que ces éléments seront suffisants pour que quelqu'un comprenne le problème.
Merci d'avance pour votre retour.
Bonne soirée
Partager