|
[[ Old comment, sent by email on 16 Aug 2006 02:55:27 -0000 ]] Hi Kalpesh, Thanks for Your response. But the issue is that, I might be having 50 or even 500 multi select boxes in my application depending upon the records in my database. If I implement reset method, I dont want to iterate each check box and reset it to a default value. Is there any way to reset all the multi select boxes to a default value, in one shot. As per your suggestion, I need to get the request parameters and compare their values with those of the multi select box selected options and reset it accordingly? My question here is, multi-selectbox A(String[]) is having a default value null. Once data is loaded from database A's value is {x,y}. If user unselects both the x and y in browser for this multi-select box then it is still showing the {x,y} in my Action class when I pass the values back to database. what I'm expecting is a null value for A. Please let me know how to resolve this. Thanks and Regards, Sreedhar. http://issues.apache.org/struts/browse/STR-2927?page=comments#action_37962 ] the request only if the checkbox/select is selected. If you dont unselect it, you wont get the key=value in your request. method of the ActionForm, reset the value for the array i.e. retaining previous values if none is selected. ----------------------------------------------------------------------------- ----------------------------------- URL: http://issues.apache.org/struts/browse/STR-2927 Struts 1 Affects Versions: 1.2 Family is the HTML for my element. size="3" ><option value="1">ABC</option> selected="selected">DEF</option> <option value="6" selected="selected">JKL</option> value="9">MNO</option> selected="selected">VWX</option> selected="selected">YZA</option> <option value="1111">FFFFF</option> <option value="209">TQPN</option> </select> database. If I re-visit the application and deselect all the options selected in this box, it is not reflecting to show empty list. I'm using a string array in my form bean to hold these values. the String array should be empty or null. But it is still holding the previous set of values. any other action(selecting other values or deselecting one or more by keeping atleast one value selected) it works fine. automatically generated by JIRA. contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa information on JIRA, see: http://www.atlassian.com/software/jira
Niall Pemberton made changes - 28/Nov/06 06:40 PM
Paul Benedict made changes - 04/Jul/07 05:31 AM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
in the request only if the checkbox/select is selected. If you dont
select or unselect it, you wont get the key=value in your request.
In your reset method of the ActionForm, reset the value for the array
to null.
Thanks,
-Kalpesh