Bonjour à tous et à c_nvy (tu me vois un peu trop souvent...je sais)

Mon problème cette fois-ci concerne le contrôle du formulaire.
Rappel pour celles ou ceux qui connaissent déjà mes problèmes précédents, ma page principale (bic.jsp) affiche des données extraites d'une base. Un bouton "Ajouter" crée une fenêtre "pop-up" (nabic.jsp) permettant de remplir un "formulaire" pour ajouter dans la base par la confirmation d'un bouton "Submit".

Pour la validation du formulaire, j'utlise d'une part le Javascript mais ca c'est un autre problème (toujours à résoudre ), d'autre part le Validator de Struts.

Ce que j'aimerais, c'est que si un champ échoue au contrôle, la fenêtre rest toujours en place avec les messages d'erreurs au début ou encore mieux à droite des champs. Le contrôle a bien eu lieu (pas tout bon), mais la fenêtre "pop-up" devient principale

Voici mon struts-config.xml
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
 
<action-mappings>
		<action path="/logon" type="com.rcibanque.rci_bicadm.client.actions.LoginAction" 
				parameter="actionId" 
				scope="request" 
				name="loginForm" 
				validate="true" 
				input="/jsp/habilitation.jsp">
			<forward name="viewRoleAdm" path="/viewb.do?actionId=action.view.bic"/>
		</action>
		<action path="/logout" type="com.rcibanque.rci_bicadm.client.actions.LoginAction" 
				parameter="actionId">
		</action>		
		<action path="/viewb" type="com.rcibanque.rci_bicadm.client.actions.BicViewAction" 
				name="bicForm" 
				scope="session" 
				validate="false"
				parameter="actionId">
			<forward name="viewb" path="/jsp/bic.jsp"/>
 
  		</action>		
  		<action
			path="/register"
			type="com.rcibanque.rci_bicadm.client.actions.BicViewAction"
			name="bicForm"
			scope="session"
			input="/jsp/nabic.jsp">
 
		<forward name="viewb" path="/jsp/bic.jsp"/>
		</action>
 
 
	</action-mappings>
 
	<!-- Ressources de messages -->
	<message-resources parameter="com.rcibanque.rci_bicadm.resources.ApplicationResources"/>
 
	<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
		<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  	</plug-in>
nabic.jsp
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
<script type="text/javascript">
 
   function addBic()
   {
 
 
       document.forms[0].target = window.dialogArguments.targetName;       
       document.forms[0].submit();
       window.close();
 
   }
   function cancel()
   {
          window.close();
   }
 
 
 
 
 
 
<form action="<html:rewrite page="/register.do?actionId=action.add.bic"/>" method="post">
 
  <table width="450px;" class="RnoTableData" border="0" align="center">
   <tr>
    <td style="width:350px;">
     <table width="100%" border="0">
 
      <tr>   
       	<td style="width:150px;">
       		<bean:message key="bicform.property.table.bicCode"/>&nbsp;&nbsp;
      	</td>
      	<td>
      		<html:text name="bicForm" property="newBicCode" style="width:150px;"/>
      	</td>
      </tr>
 
      <tr>   
       	<td style="width:150px;">
       		<bean:message key="bicform.property.table.branchCode"/>&nbsp;&nbsp;
      	</td>
      	<td>
      		<html:text name="bicForm" property="newBranchCode" onkeyup="textctrl(this, 8)" style="width:20px;"/>
      	</td>
      </tr>
 
      <tr>   
      	<td style="width:150px;border-color:blue;border-style:solid;">
       		<bean:message key="bicform.property.table.flags"/>&nbsp;
       		</td>
       		<td>
       		<html:select name="bicForm" property="newFlagCode">
        		<html:option value=""><bean:message key="bicform.property.filter.flags.all"/></html:option>
        		<html:options collection="flags" property="flagCode"/>       
       		</html:select>
      	</td>
      </tr>
 
      <tr>   
       	<td style="width:150px;">
       		<bean:message key="bicform.property.table.physicalAddress"/>&nbsp;&nbsp;
      	</td>
      	<td>
      		<html:textarea name="bicForm" property="newPhysicalAddress" cols="50" rows="3" style="width:250px;"/>
      	</td>
      </tr>
 
     </table>
    </td>
 
   </tr>
 
  </table>
 
  <table border="0" align="center">
    <tr>
     <td>
      <p><a class="ButtonAdd" href="#" onclick="javascript:cancel();"><bean:message key="bicform.property.bic.cancel"/></a></p>
     </td>
     <td>
      <p><a class="ButtonAdd" href="#" onclick="javascript:addBic();"><bean:message key="bicform.property.bic.add"/></a></p>
     </td>
    </tr>
   </table>
 
</form>
BicViewAction.java
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
public ActionForward addBic(ActionMapping in_mapping,
			  ActionForm in_form,
		      HttpServletRequest in_request,
		      HttpServletResponse in_response) throws Exception
	{
 
 
		addManualBic(true,in_form,in_request);
		viewProducts(in_form,in_request);
 
		return in_mapping.findForward("register");
	}
validation.xml
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
 
<form name="bicForm">
 
			<field property="newBicCode" depends="required,minlength,maxlength">
				<msg name="required" key="errors.required"/>
    	        <msg name="minlength" key="errors.minlength"/>
    	        <msg name="maxlength" key="errors.maxlength"/>
		        <var>
		        	<var-name>minlength</var-name>
		        	<var-value>8</var-value>
		        </var>
		        <var>
		        	<var-name>maxlength</var-name>
		        	<var-value>8</var-value>
		        </var>
    	    </field>
</form>
Merci d'avance.