Why don't you try this.... FORM ===== Private String permission = "N"; // set the default to N
JSP === <html:checkbox property="permission" value="Y"/> DATABASE ========= -- You would store a char(1) in the DB If the check box IS checked and submitted the "Y" values gets submitted to the backend, if the checkbox is NOT checked and submitted nothing gets submitted from the front-end and it defaults to "N" as <html:checkbox property="permission" value="Y"/>, it it were to be a "Y" the checkbox would be checked... I don't think you need any logic to check or uncheck. On return if a "N" is returned, by the time the checkbox is displayed, it would not be checked because "N" is not the same as -----Original Message----- From: vivek mannur [mailto:[EMAIL PROTECTED] Sent: Monday, December 18, 2006 12:03 AM To: user@struts.apache.org Subject: [s2] CheckBox issues Hi, I've just started working on struts 2. I have a table with check boxes in a matrix kind of a view. Here depending on the database values some checkboxes are initially checked and the remaining are unchecked. When I check an unchecked box then I get a 'failed to load remote content error'. Here is the code: <td align=center> <s:if test="${value} == 1"> <s:checkbox id="permissions" name="permissions" value="true" fieldValue="${moduleName}.${key}" theme="simple"/> </s:if> <s:if test="${value} == 0"> <s:checkbox id="permissions" name="permissions" value="false" fieldValue='${moduleName}.${key}' theme="simple"/> </s:if> </td> Here the fieldValue is used later to keep track of all the checked boxes. Any help would be much appreciated. Yours truly, Vivek. DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]