You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wendy Smoak <We...@asu.edu> on 2002/12/03 22:05:14 UTC

RE: select box doesn't call set method in form bean when nothing is s elected

GlenR wrote:
> So, the question:  when a user de-selects everything from a multiple
> select box, how can struts know to clear the form bean variable since
> the html form is no longer sending data corresponding to that variable?

Only "successful" form elements will be present in the request.  Checkboxes
that are not checked are not successful form elements.  Use the "reset"
method in your form bean to "uncheck" all of the boxes, and then Struts will
handle calling the 'set' method for only those boxes that the user has
checked.

Boy, it's fun watching other people run into the exact same problems I did,
all those months ago... ;)

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management