The Actionform is in the session. I may not alway want to reset the property.

helloooo !


>>> [EMAIL PROTECTED] 09/23/03 09:21AM >>>
<snip>
implicitly set the property to an empty String[];
eg. In the Validate Method()
</snip>

Helllllooooo .... 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]

Reply via email to