html:checkbox Tag problem
Hai I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . Thanx faisal _ The heat is on! Catch the latest action. http://server1.msn.co.in/sp03/formula2003/ Speed along with F1! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox Tag problem
Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox Tag problem
Another way is to implement the reset method. This will allow you to initialize all your checkboxes to the unchecked value. -Tim -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15, 2003 12:42 PM To: Struts Users Mailing List Subject: RE: html:checkbox Tag problem Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:checkbox Tag problem
I think multibox will return the value of the checked items which might help you out. --- Wendy Smoak [EMAIL PROTECTED] wrote: Faisal wrote: I populate data from database in to the Action form, which i am using to display multiple records in the JSP Page. Here i am using Html:checkbox as an indicator to every record in the the page. I have associated the checkobox with String array Property. My Problem is when i submit the form and say form.getPropertyName(), I am getting the values of only the checked items. I would like to know how to iniatilize the unchecked values and how struts handles. I need it urgently . The request will only contain successful form elements. Un-checked checkboxes are NOT successful and will not be in the request. (This is an HTML/browser thing, not Struts.) If you need something to come through in the request, html:hidden might be appropriate. Post some of the JSP and your Form bean, and perhaps someone will have an idea for you. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University, PA, IRM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]