struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Struts Newsgroup (@Basebeans.com) <str...@basebeans.com>
Subject Re: Using Reset with Checkboxes
Date Fri, 03 May 2002 13:40:02 GMT
Subject: Re: Using Reset with Checkboxes
From: "Ken Holzer" <kholzer@bhroyce.com>
 ===
Thanks for the information Jose.

Another question is when and where does the reset get called?

Ken
"Jose Quinteiro" <struts@quinteiro.com> wrote in message
news:3CD19F0E.502@quinteiro.com...
> You should check for the checkbox parameter(s) in the request, and set
> it(them) to false if they are not present.
>
> For example, if you have a form called "Foo" with a boolean property
> called "fubar" that is displayed a checkbox.
>
> In reset you would:
>
> public void reset( ActionMapping mapping,
>                     javax.servlet.http.HttpServletRequest request )
> {
> if( request.getParameter("fubar") == null )
> this.setFubar = false;
> }
>
> Ken Holzer wrote:
> > Hi All,
> >
> > I am trying to understand how and when to use the reset with checkboxes.
> >
> > I have seen posting that say when using checkboxes on forms you must
reset
> > their value to false. When should this be done?
> >
> > I have a form that contains several checkboxes that get checked when the
> > form opens based on some database values (that all is working). But when
I
> > check or uncheck these and then submit the form how do I see the
checkboxes
> > current value?
> >
> > Sorry if this is something that has already been answered, I searched
the
> > archive and did not see any specific responses, just to use reset.
> >
> > Thanks,
> >
> > Ken Holzer
> >
> >
>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message