Re: Can't uncheck multibox
Hi, I had this problem when I placed my ActionForm in the Session. I noticed that when I uncheck all the checkboxes, the browser would transmit no value for the checkbox property and so the ActionForm property would not be updated to an empty String[] as I had expected. html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox If you uncheck all the checkboxes in your example, the request query string parameter actionItemIndicator would not be transmitted. i.e. there would be no actionItemIndicator= in the query string. Most browsers dont transmit parameters when they have no values. I worked around this problem by checking if this parameter was null, and then implicitly set the property to an empty String[]; eg. In the Validate Method() ... if (httpServletRequest.getParameter(actionItemIndicator) == null) { actionItemIndicator = new String[] {}; } HTH. S. [EMAIL PROTECTED] 09/22/03 04:56PM Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't uncheck multibox
snip implicitly set the property to an empty String[]; eg. In the Validate Method() /snip Helo this is what the reset() method is for. That is its sole reason dee etrer. To provide a place for you to reset the values of checkbox, textarea, multiple-select fields associated with the page that has just submitted. RTFM/STFW and verily shall ye learneth. This topic comes up so often Im surprised someone hasnt written a listbot to answer it. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 14:59 To: [EMAIL PROTECTED] Subject: Re: Can't uncheck multibox Hi, I had this problem when I placed my ActionForm in the Session. I noticed that when I uncheck all the checkboxes, the browser would transmit no value for the checkbox property and so the ActionForm property would not be updated to an empty String[] as I had expected. html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox If you uncheck all the checkboxes in your example, the request query string parameter actionItemIndicator would not be transmitted. i.e. there would be no actionItemIndicator= in the query string. Most browsers dont transmit parameters when they have no values. I worked around this problem by checking if this parameter was null, and then implicitly set the property to an empty String[]; eg. In the Validate Method() ... if (httpServletRequest.getParameter(actionItemIndicator) == null) { actionItemIndicator = new String[] {}; } HTH. S. [EMAIL PROTECTED] 09/22/03 04:56PM Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't uncheck multibox
The Actionform is in the session. I may not alway want to reset the property. hell ! [EMAIL PROTECTED] 09/23/03 09:21AM snip implicitly set the property to an empty String[]; eg. In the Validate Method() /snip Helo this is what the reset() method is for. That is its sole reason dee etrer. To provide a place for you to reset the values of checkbox, textarea, multiple-select fields associated with the page that has just submitted. RTFM/STFW and verily shall ye learneth. This topic comes up so often Im surprised someone hasnt written a listbot to answer it. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 14:59 To: [EMAIL PROTECTED] Subject: Re: Can't uncheck multibox Hi, I had this problem when I placed my ActionForm in the Session. I noticed that when I uncheck all the checkboxes, the browser would transmit no value for the checkbox property and so the ActionForm property would not be updated to an empty String[] as I had expected. html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox If you uncheck all the checkboxes in your example, the request query string parameter actionItemIndicator would not be transmitted. i.e. there would be no actionItemIndicator= in the query string. Most browsers dont transmit parameters when they have no values. I worked around this problem by checking if this parameter was null, and then implicitly set the property to an empty String[]; eg. In the Validate Method() ... if (httpServletRequest.getParameter(actionItemIndicator) == null) { actionItemIndicator = new String[] {}; } HTH. S. [EMAIL PROTECTED] 09/22/03 04:56PM Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't uncheck multibox
Well if you dont want your checkboxes to be untickable then by all means go ahead and dont reset them, but Im telling ya mate, thats what reset() is for, and the validate method isn't the proper place for it (though of course its not going to send you blind if you do do it there). If you dont want to reset a property (for example its on a seperate page of a wizard that shares the same actionform instance with this page) then of course you need to do a bit of 'logic' to work out which properties need to be reset and which shouldnt - the rule of thumb (imho) is that you shouldnt just anyhow reset everything, but that you should only reset values for those fields that need it - ie: checkboxes, textareas, multiple-selects that were on the screen that submitted this request... btw: This is all mostly relevant only to session scoped forms, as request scoped forms imply that you get a clean form (new instance) every time anyhow. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 15:21 To: [EMAIL PROTECTED] Subject: RE: Can't uncheck multibox The Actionform is in the session. I may not alway want to reset the property. hell ! [EMAIL PROTECTED] 09/23/03 09:21AM snip implicitly set the property to an empty String[]; eg. In the Validate Method() /snip Helo this is what the reset() method is for. That is its sole reason dee etrer. To provide a place for you to reset the values of checkbox, textarea, multiple-select fields associated with the page that has just submitted. RTFM/STFW and verily shall ye learneth. This topic comes up so often Im surprised someone hasnt written a listbot to answer it. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 14:59 To: [EMAIL PROTECTED] Subject: Re: Can't uncheck multibox Hi, I had this problem when I placed my ActionForm in the Session. I noticed that when I uncheck all the checkboxes, the browser would transmit no value for the checkbox property and so the ActionForm property would not be updated to an empty String[] as I had expected. html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox If you uncheck all the checkboxes in your example, the request query string parameter actionItemIndicator would not be transmitted. i.e. there would be no actionItemIndicator= in the query string. Most browsers dont transmit parameters when they have no values. I worked around this problem by checking if this parameter was null, and then implicitly set the property to an empty String[]; eg. In the Validate Method() ... if (httpServletRequest.getParameter(actionItemIndicator) == null) { actionItemIndicator = new String[] {}; } HTH. S. [EMAIL PROTECTED] 09/22/03 04:56PM Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies
RE: Can't uncheck multibox
Whats your point mate? You are basically agreeing with me. Why dont you simply provide an answer instead of trying to justify your rant? I accept your point that it should be done in the reset method. Scott. [EMAIL PROTECTED] 09/23/03 09:41AM Well if you dont want your checkboxes to be untickable then by all means go ahead and dont reset them, but Im telling ya mate, thats what reset() is for, and the validate method isn't the proper place for it (though of course its not going to send you blind if you do do it there). If you dont want to reset a property (for example its on a seperate page of a wizard that shares the same actionform instance with this page) then of course you need to do a bit of 'logic' to work out which properties need to be reset and which shouldnt - the rule of thumb (imho) is that you shouldnt just anyhow reset everything, but that you should only reset values for those fields that need it - ie: checkboxes, textareas, multiple-selects that were on the screen that submitted this request... btw: This is all mostly relevant only to session scoped forms, as request scoped forms imply that you get a clean form (new instance) every time anyhow. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 15:21 To: [EMAIL PROTECTED] Subject: RE: Can't uncheck multibox The Actionform is in the session. I may not alway want to reset the property. hell ! [EMAIL PROTECTED] 09/23/03 09:21AM snip implicitly set the property to an empty String[]; eg. In the Validate Method() /snip Helo this is what the reset() method is for. That is its sole reason dee etrer. To provide a place for you to reset the values of checkbox, textarea, multiple-select fields associated with the page that has just submitted. RTFM/STFW and verily shall ye learneth. This topic comes up so often Im surprised someone hasnt written a listbot to answer it. -Original Message- From: SCOTT VENTER [mailto:[EMAIL PROTECTED] Sent: Tuesday, 23 September 2003 14:59 To: [EMAIL PROTECTED] Subject: Re: Can't uncheck multibox Hi, I had this problem when I placed my ActionForm in the Session. I noticed that when I uncheck all the checkboxes, the browser would transmit no value for the checkbox property and so the ActionForm property would not be updated to an empty String[] as I had expected. html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox If you uncheck all the checkboxes in your example, the request query string parameter actionItemIndicator would not be transmitted. i.e. there would be no actionItemIndicator= in the query string. Most browsers dont transmit parameters when they have no values. I worked around this problem by checking if this parameter was null, and then implicitly set the property to an empty String[]; eg. In the Validate Method() ... if (httpServletRequest.getParameter(actionItemIndicator) == null) { actionItemIndicator = new String[] {}; } HTH. S. [EMAIL PROTECTED] 09/22/03 04:56PM Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy all copies. # - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] # The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon
Re: Can't uncheck multibox
Hi Hari, To solve it, I set the length of the array containing the checkboxes to 0 in the form's reset method. I do have the form in the session, and this will only work if you have the form in the session. Here is my reset() code: //reset the action item indicator checkboxes String[] newAiList = new String[0]; this.dynaValues.put(actionItemIndicator, newAiList); This fixed my problem. I hope it helps you. Natalie hari_s wrote: Hi Natalie I also work with html:multibox and have similar problem with you + problem to get the value from html:multibox, how did you solve it? Thank you, for your answer Natalie... -Original Message- From: Natalie D Rassmann [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 9:57 PM To: Struts Users Mailing List Subject: Can't uncheck multibox Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie - 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]
Can't uncheck multibox
Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't uncheck multibox
Hi Natalie I also work with html:multibox and have similar problem with you + problem to get the value from html:multibox, how did you solve it? Thank you, for your answer Natalie... -Original Message- From: Natalie D Rassmann [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2003 9:57 PM To: Struts Users Mailing List Subject: Can't uncheck multibox Can anyone help??? I have the following multibox in a dyanValidatorForm: logic:iterate id=defectsList name=reviewRecordForm property=defectsList indexId=i html:multibox property=actionItemIndicator bean:write name=defectsList property=defectId/ /html:multibox /logic:iterate I am having trouble unchecking the checkboxes. Everytime I uncheck a checkbox, hit submit, when the screen comes back the checkbox is still checked. When I extract, the form data from this property, the form still indicates that the checkbox is checked even though I unchecked it in the form How do I uncheck a box once it has been unchecked by the user??? Thanks in advance, Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]