You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by gl...@agilent.com on 2002/12/03 22:00:06 UTC
select box doesn't call set method in form bean when nothing is s
elected
I have a multiple select box on my jsp (html:select). When the user selects an item from the list, our form bean picks up that fact just fine. However, if the user then un-selects that item (ctrl-click) so there is nothing selected in the box, the set method for that box doesn't get called so it 'remembers' that last value the user selected.
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?
Thank you,
GlenR
Re: select box doesn't call set method in form bean when nothing is selected
Posted by Patrice <pp...@nerim.net>.
I think you can clear the value of the property in the reset() method of your form bean.
Best regards
Patrice
----- Original Message -----
From: glen_roberts@agilent.com
To: struts-user@jakarta.apache.org
Sent: Tuesday, December 03, 2002 10:00 PM
Subject: select box doesn't call set method in form bean when nothing is selected
I have a multiple select box on my jsp (html:select). When the user selects an item from the list, our form bean picks up that fact just fine. However, if the user then un-selects that item (ctrl-click) so there is nothing selected in the box, the set method for that box doesn't get called so it 'remembers' that last value the user selected.
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?
Thank you,
GlenR
------------------------------------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>