Johansen [mailto:[EMAIL PROTECTED]
> > Sent: June 10, 2003 12:38 PM
> > To: Struts Users Mailing List
> > Subject: Re: Checkbox problem?
> >
> >
> > oki, maybe my explanation isn't the best :) (I know that I can't do it
> > in the reset method, as
Steve wrote:
> The suggested method requires two actions.
> SetupAction -> Form -> ProcessAction
> The first action prepares any values required by your form,
> including setting the value of your checkboxes to true. The
> second action is the one that actually processes the user
> input gathe
Hope this clarifies things.
Steve
> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: June 10, 2003 12:38 PM
> To: Struts Users Mailing List
> Subject: Re: Checkbox problem?
>
>
> oki, maybe my explanation isn't the best :) (I kno
ing the form) will determine whether the checkboxes are set or not.
> -Original Message-
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 12:38 PM
> To: Struts Users Mailing List
> Subject: Re: Checkbox problem?
>
> oki, maybe my expl
You can pre-populate the form in a previous action. Here is an example.
http://jakarta.apache.org/struts/faqs/newbie.html#prepopulate
-Kevin
--- Bjørn T Johansen <[EMAIL PROTECTED]> wrote:
> oki, maybe my explanation isn't the best :) (I know that I can't do it
> in the reset method, as it is cl
s Users Mailing List
Subject: Re: Checkbox problem?
oki, maybe my explanation isn't the best :) (I know that I can't do it
in the reset method, as it is clearly not working) but I am still not
sure where to put the code to set the checkbox to true then.
As far as I know, the action class
oki, maybe my explanation isn't the best :) (I know that I can't do it
in the reset method, as it is clearly not working) but I am still not
sure where to put the code to set the checkbox to true then.
As far as I know, the action class isn't called before after the form
bean has called the reset
Go get 'em, James!
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 2:29 PM
To: Struts Users Mailing List
Subject: Re: Checkbox problem?
On Tuesday 10 June 2003 14:11, Bjørn T Johansen wrote:
> You are missing my point! If I just c
On Tuesday 10 June 2003 14:11, Bjørn T Johansen wrote:
> You are missing my point! If I just could set the checkbox value to
> false in the reset method, everything is fine. But there are times when
> that value has to be reset to true and not false and if I do that in my
> reset method, I am not a
You are missing my point! If I just could set the checkbox value to
false in the reset method, everything is fine. But there are times when
that value has to be reset to true and not false and if I do that in my
reset method, I am not able to see of the user unchek the checkbox,
because the boolean
[EMAIL PROTECTED]
| Yes, but to clarify...
| I am showing a jsp page with values read from a database. If the
| checkbox value is true, how do I then make the checkbox on my jsp-page
| checked and how do I then find out if the checkbox has been unchecked?
| Do I have to manually read the posted da
In your ActionForm reset() method, set the checkbox
value to false.
Struts will set the value to true if the box is
checked.
If you are using DynaForms, you will need to extend it
and override the reset() method.
To populate the checkbox initially, you need to
instantiate and populate the form b
Yes, but to clarify...
I am showing a jsp page with values read from a database. If the
checkbox value is true, how do I then make the checkbox on my jsp-page
checked and how do I then find out if the checkbox has been unchecked?
Do I have to manually read the posted data and see if the checkbox
at
I had some issues with the methods, so I came up with something else that
works very nicely.
In the JSP, right after the code for the checkbox, use:
This allows the form submission to work correctly, without any messy code.
However, I am no expert with this stuff, so if there is any reason not t
I would suggest not doing the propagate in the reset. Just use it for the original
values. The values entered on the form are automatically propagated by struts after
the reset by the setters and getters. Just put in some logging or print statements
in those methods and you will see when t
Can you describe what's going on in more detail?
--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
- Original Message -
From: "Bjorn T Johansen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 10, 2003 4:26 AM
Subject: Checkbox problem?
cc:
Subject: RE: checkbox problem
11/11/2002 03:46
-Ursprüngliche Nachricht-
Von: James Mitchell [mailto:jmitchtx@;telocity.com]
Gesendet: Montag, 11. November 2002 14:36
An: Struts Users Mailing List
Betreff: RE: checkbox problem
You need to set it to false in the reset() method.
James Mitchell
Software Engineer/Struts Evangelist
http://www
if u want uncheck the box, after a submit , set it to false
-Original Message-
From: James Mitchell [mailto:jmitchtx@;telocity.com]
Sent: Monday, November 11, 2002 7:06 PM
To: Struts Users Mailing List
Subject: RE: checkbox problem
You need to set it to false in the reset() method
-Original Message-
> From: Saini, Deepank [mailto:deepank.saini@;cgey.com]
> Sent: Monday, November 11, 2002 8:33 AM
> To: 'Struts Users Mailing List'
> Subject: RE: checkbox problem
>
>
> may u need to reset the value of the checkbox to (false or true) in the
>
may u need to reset the value of the checkbox to (false or true) in the
reset method of ur formbean
-Original Message-
From: Hirschmann, Bernhard [mailto:Bernhard.Hirschmann@;t-systems.com]
Sent: Monday, November 11, 2002 7:00 PM
To: '[EMAIL PROTECTED]'
Subject: checkbox problem
Hello S
I suppose you have several checkboxes corresponding to the List of objects.
Are you using the tag? If not, you should. The Struts framework will
save the selected values in a String array that you provide. The value stored will be
the value of the checkbox. For example
if the checkbox is
The reset(...) method in your form needs to reset the checkbox to "false",
every time.
-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127
-Original Message-
From: Sachin [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05,
reset the check box values in the struts form reset method.
-Original Message-
From: Sachin [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 6:35 PM
To: [EMAIL PROTECTED]
Subject: CheckBox problem in struts..
Hi
Could anyone explain about the checkbox problem in struts
if i have
Hi all,
I've worked on it a bit more and come up with these
steps to make it work.
I use a multibox instead of a checkbox like this on
my form:
I then also include with this a hidden
field
The form bean remains the same.
In my action class, I can then get the required
values
Hi!
I had a similar problem and solved it by changing
the attribute scope in my
action in the struts-config.xml file to request
instead of session.
/Linnéa
- Original Message -
From:
Joel Vogt
To: [EMAIL PROTECTED]
Sent: Thursday, June 28, 2001 10:04
AM
Subject
26 matches
Mail list logo