Sallemel, If you uncheck the box, you should have a javascript event on your page that iterates to your form variables and re-assign a new value = "". Something like this
document.form. CAjustTypeAjust = "". Let me know if this works. ________________________________ From: elyes sallem <elyes.sal...@gmail.com> To: Struts Users Mailing List <user@struts.apache.org> Sent: Thursday, April 9, 2009 5:10:33 AM Subject: Fwd: event onclick of nested:checkbox Hello, i have another problem with this checkbox in fact , this checkbox can take two value : "R" or "" if it is equal to "R", the checkbox is checked else it is uncheckd here is the code i imlemented : <nested:checkbox property="CAjustTypeAjust" value="R" /> and in tha actionForm i added a reset method , where i affect the type to "" public void reset(ActionMapping mapping, HttpServletRequest request) { if (!ajustContrat.isEmpty()) { for (Iterator<AjustContrat> iterator = ajustContrat.iterator(); iterator.hasNext();) { AjustContrat ajustContrat = (AjustContrat) iterator.next(); ajustContrat.setCAjustTypeAjust(""); } } } but the problem is that , if i have a checked checkbox, and i uncheck it , i expect that its takes "" as value, but i take the old value "R" and if i have an unchecked checkbox, if i check it, i expected it takes "R" as value, but its takes the old value "" any one has an idea how to solve this problem? Regards Sallemel ---------- Forwarded message ---------- From: elyes sallem <elyes.sal...@gmail.com> Date: 2009/4/8 Subject: event onclick of nested:checkbox To: Struts Users Mailing List <user@struts.apache.org> Hello, i have a checkbox to which i associated an event onclick for this, i call a javascript function verifierReversible here is the component call <nested:checkbox property="CAjustTypeAjust" onclick="verifierReversible(<%= Integer.parseInt(numLigne) %>)"> an here is the javascript function function verifierReversible(i){ if (document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].checked==true){ document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].value="R"; } else { document.forms[0].elements["ajustContrat["+i+"].CAjustTypeAjust"].value=null; } } the problem is that Integer.parseInt(numLigne) is not replaced with its value any one has an idea? Regards Elyes* * -- Elyes.