I'm still a little hazy on when reset is called on forms, but you may want
to try moving
marketing = marketingItems;
to the forms constructor, so when the form is created the first time its
holding the default values.
And inside the reset method:
marketing = null;
-David
- Original Message
Actually according to Ted inside the reset method your code should be:
marketing = new String[] {};
HTH,
David
- Original Message -
From: David Erickson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 1:22 PM
Subject: Re: Multibox
From: David Erickson [mailto:[EMAIL PROTECTED]
I'm still a little hazy on when reset is called on forms,
Right before they get populated from the values in the request.
but you may want to try moving
marketing = marketingItems;
to the forms constructor, so when the form is created the
Subject: Re: Multibox problem when defaulted all on
Actually according to Ted inside the reset method your code should be:
marketing = new String[] {};
HTH,
David
- Original Message -
From: David Erickson [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday
Erickson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 12:28 PM
To: Struts Users Mailing List
Subject: Re: Multibox problem when defaulted all on
Actually according to Ted inside the reset method your code should be:
marketing = new String[] {};
HTH,
David
- Original
, March 14, 2004 11:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Multibox and selected values
Saul,
How can I access the current user from the form bean? The
current user is
in the session. So in other words my question is how can I
access the
session from the form bean?
Thanks
is used.
Thanks in advance for your help!
From: Saul Q Yuan [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: Multibox and selected values
Date: Mon, 15 Mar 2004 10:40:09 -0500
I am not sure you can get
class, and in
your action class, try get the current user and set it in the form bean.
-Original Message-
From: Amish Patel [mailto:[EMAIL PROTECTED]
Sent: Sunday, March 14, 2004 11:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Multibox and selected values
Saul,
How can I
And then how do I get the session from there? I looked at the API and the
servlet context object does not have access to the HttpSession object.
From: Craig Tataryn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Multibox and selected
.
-Original Message-
From: Amish Patel [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 11:05 AM
To: [EMAIL PROTECTED]
Subject: RE: Multibox and selected values
How can I do what you are telling me do. Look at my code
logic:iterate name=associateUserRoleForm property=allRoles
id
to the HttpSession object.
From: Craig Tataryn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Multibox and selected values
Date: Mon, 15 Mar 2004 10:36:58 -0600 (CST)
I've done this in the past within an ActionForm like so
From: Craig Tataryn [mailto:[EMAIL PROTECTED]
this.servlet.getServletContext().getAttribute() should give
you access to beans in the user session.
Application/Context scope != Session scope
--
Wendy Smoak
-
To
Oh right, sorry yeah my code looks in the Application scope in this instance.
For getting the request scope variables I needed I had subclassed DispatchAction for
my project and
set the properties on my form bean which were grabbed from the request from within an
overriden
dispatchMethod
If I understand your questions correctly, you can define two String arrays in your
form bean, one for allRoles, and the other for selectedRoles, which is the array of
roles of the current user. Before forwarding to your jsp, in your action class, you
can retrive all the roles of the currently
PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Multibox and selected values
Date: Sun, 14 Mar 2004 20:42:31 -0500
If I understand your questions correctly, you can define two String arrays
in your form bean, one for allRoles, and the other for selectedRoles, which
I downloaded the nightly build from last night. It did fix the
javascript validation but if I turn javascript off, the validators still
don't enforce the required validation on the multibox. Any
suggestions?
[EMAIL PROTECTED] 01/22/04 08:35AM
This is a known issue for the release version of
This is a known issue for the release version of Struts1.1, but if you
download a nightly build after Sep 24 2003, the required validation will
work.
Saul
-Original Message-
From: Justin Miller [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 9:43 AM
To: [EMAIL PROTECTED]
store the properties in a bean and recall them in your action.
F.
- Original Message -
From: ZYD [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 3:52 AM
Subject: multibox - Null attribute name ServletException
I tried to use
Thanks for your response.
Could you give me some hint? I'm a struts newbie.
Thanks a lot.
- Original Message -
From: Firat TIRYAKI [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 11:04 PM
Subject: Re: multibox - Null attribute name
Mailing List [EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 10:23 AM
Subject: Re: multibox - Null attribute name ServletException
Thanks for your response.
Could you give me some hint? I'm a struts newbie.
Thanks a lot.
- Original Message -
From: Firat TIRYAKI [EMAIL
My problem is that I have a table in which every row is a object of a
formbean and has checkbox on the left which is a column of the table.
So
Then each row is identified somehow (indexed?). Each row will need to
have
that checkbox named (property) exactly the same way on each row, but you
can
]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:24 AM
Subject: Re: Multibox persistence problem
1. Make sure that you are overriding the reset() method in the ActionForm.
2. In reset(), make sure you do NOT reset the value of the Collection
that contains your multibox
put Collection for multibox to the
form bean, but to separate bean...
- Original Message -
From: David Chelimsky [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:24 AM
Subject: Re: Multibox persistence problem
1. Make sure that you
);
- Original Message -
From: David Chelimsky [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:58 PM
Subject: Re: Multibox persistence problem
I've only been able to make this work w/ session scope. Can you please
post your code so I can see
()));
}
application.setAttribute(allRoles, allRoles);
- Original Message -
From: David Chelimsky [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:58 PM
Subject: Re: Multibox persistence problem
I've only been able to make this work w
try setting scope=session in your action.
HTH
- Original Message -
From: Mykola Ostapchuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:35 AM
Subject: Multibox persistence problem
Hi,
I'm using multibox to display multiple checkboxes:
font size=2pre
, 2003 11:15 PM
Subject: Re: Multibox persistence problem
try setting scope=session in your action.
HTH
- Original Message -
From: Mykola Ostapchuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 10:35 AM
Subject: Multibox persistence problem
Hi,
I'm using
Have you looked at html-multibox.jsp that is in the struts-exercise-taglib application
that ships with Struts?
Sri
-Original Message-
From: Jobe, Mike [EESUS] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: multibox?
Can anyone
No I haven't, thanks I will look at it!
Mike
-Original Message-
From: Sri Sankaran [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 10:49 AM
To: Struts Users Mailing List
Subject: RE: multibox?
Have you looked at html-multibox.jsp that is in the struts-exercise-taglib
form-property name=products
type=java.lang.String[]
initial={}/
robert
-Original Message-
From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 2:00 PM
To: [EMAIL
Yah, that's it. Thanks.
Dave
-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 22, 2003 1:27 PM
To: Struts Users Mailing List
Subject: RE: multibox and DynaValidatorForm
form-property name=products
http://husted.com/struts/tips/007.html
-Original Message-
From: AMIR-TAHMASSEB Marc [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:45 PM
To: '[EMAIL PROTECTED]'
Subject: Multibox and setter problem
Hi everybody (and happy new year :-)
I have a jsp page with multibox. When
where ?
-Message d'origine-
De : Alireza Fattahi [mailto:[EMAIL PROTECTED]]
Envoyé : mardi 7 janvier 2003 07:00
À : 'Struts Users Mailing List'
Objet : RE: Multibox and setter problem
http://husted.com/struts/tips/007.html
-Original Message-
From: AMIR-TAHMASSEB Marc [mailto
Kiuma,
It looks like you need to change your property caChecked to acChecked
David R
kiuma [EMAIL PROTECTED] wrote:hello,
On some forms I have a no getter method error , and I can't see the reason.
The problem doesn't exist if I use for ex. a html-el.text element.
This is my form
David Rothschadl ha scritto:
Kiuma,
It looks like you need to change your property caChecked to acChecked
David R
kiuma [EMAIL PROTECTED] wrote:hello,
On some forms I have a no getter method error , and I can't see the reason.
The problem doesn't exist if I use for ex. a html-el.text
[mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 8:33 AM
To: Struts Users Mailing List
Subject: Re: multibox problem - No getter method
David Rothschadl ha scritto:
Kiuma,
It looks like you need to change your property caChecked to acChecked
David R
kiuma [EMAIL PROTECTED] wrote:hello
-Original Message-
From: dlee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 8:57 AM
To: Struts Users Mailing List
Subject: Multibox
Hello,
I'm using struts 1.0.2.
I would like to present an input form on a jsp and part of
that would be to display a number of
yes..U are right...
-Original Message-
From: donl34 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 2:57 PM
To: struts-user
Cc: donl34
Subject: Multibox
Hello,
I'm using struts 1.0.2.
I would like to present an input form on a jsp and part of that would be to
display a
How is the TestForm(boolean) constructor being invoked? The Struts framework will
simply invoke the default constructor.
How are you setting the selected string array in Action class? Are you creating
this form bean in the Action class then setting the array? If so, are you persisting
this
Kavitha,
I am not sure about your specific error, but you should use a String array
instead of ArrayList. At least give that a try and see how far you get.
There is quite a bit of information on the multibox in the list archives.
Susan Bradeen
Kavitha ranga [EMAIL PROTECTED]
10/25/2002
Ok suppose to have a Form with a checkbox named isOn and a submit
button name Save
a NOT checked value will produce:
http://localhost:8080/webappointments/openChk.do?action=Save
a checked value will produce:
http://localhost:8080/webappointments/openChk.do?isOn=onaction=Save
The problem is
I'm coming into this discussion late, so ignore me if I'm out in left field,
but it sounds like you're unhappy that when *no* checkboxes are checked,
*no* methods get called.
When you submit the form, only successful form elements are sent in the
request, so if *no* checkboxes are checked,
Thanks a lot , you have been very clarifying.
I've found a tip placing code in validate method :
public ActionErrors validate( ActionMapping mapping, HttpServletRequest
req) {
String str = req.getParameter( isOn );
if (str == null)
isOn = false;
return
Kiuma wrote:
I've found a tip placing code in validate method :
But it's a very dirty technique of course.
That will work, but... what if you have a form that you don't want to
validate? The reason this is working is that you have validate set to true
so that the validate method gets called.
And so how can I use a collection ?
I used this but os u pointed doesn't work !
c:set var=principalPermissions
value=${sessionScope.userEditForm.principalPermissions}/
c:set var=allGroups value=${sessionScope.userEditForm.allGroups}/
c:if test=${allGroups != null}
c:forEach
The property associated with a multibox is not a collection. It's just a
scalar. Look at the struts-exercise-taglib for simple examples of this.
-Original Message-
From: kiuma [mailto:kiuma;usa.net]
Sent: Thursday, October 17, 2002 10:29 AM
To: Struts Users Mailing List
Subject:
PROTECTED]]
Sent: Saturday, 27 July 2002 12:09 AM
To: Struts Users Mailing List
Subject: Re: multibox validation and collections
On Fri, Jul 26, 2002 at 10:03:00AM +0930, Zimmer, Robin (SSABSA) wrote:
I have overrridden the validate method of the form bean to ensure
that at least one checkbox
Yes,
I did include teh struts-bean.tld.
Toni.
From: Xinhong Luo, NY [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: multibox bug
Date: Tue, 2 Jul 2002 12:29:41 -0400
hi, did you include the following
Does anybody know how to fix this bug?
Thanks.
From: Toni Nehme [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: multibox bug
Date: Tue, 02 Jul 2002 11:35:24 -0400
Hi,
I am using multibox in a Logic:iterator see below:
logic:iterate
listed on the Struts site.
/mark
-Original Message-
From: Toni Nehme [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 12:28 PM
To: [EMAIL PROTECTED]
Subject: Re: multibox bug (Help needed)
Does anybody know how to fix this bug?
Thanks.
From: Toni Nehme [EMAIL PROTECTED]
Reply
Hi Nico
Thanks ,i got it its working fine
Thanks a lot
Bye
gnan
- Original Message -
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, June 24, 2002 7:24 PM
Subject: Re: Multibox intial selection problem
A cleaner
Hi Raj
Thanks ,i got it its working fine
Thanks a lot
Bye
gnan
- Original Message -
From: Rajesh Pradhan [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 7:11 PM
Subject: RE: Multibox intial selection problem
Hi,
This is already answered
: RE: Multibox intial selection problem
Hi
Do something like this:
td width=25% Class=DisplayLeftDataCells
select size=1 name=downloadday id=downloadday
%
for(int i=0;imonthstosave.length;i++){
%
OPTION
%
if (downloadday.equals(monthstosave[i])){
%selected%}%
value
though i havent used multibox...i think the code shud work...
give it a try
-Original Message-
From: gnanaseelan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 8:09 AM
To: Struts Users Mailing List
Subject: Re: Multibox intial selection problem
Hi Susmita
Thanks
Message-
From: Susmita Pati [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 6:48 PM
To: 'Struts Users Mailing List'
Subject:RE: Multibox intial selection problem
though i havent used multibox...i think the code shud work...
give it a try
-Original Message-
From
A cleaner (IMHO) way for generating such select in HTML would be :
html:select property=monthstosave
html:options collection=monthstosaveValues
property=value
labelProperty=label/
/html:select
... where monthstosaveValues is a collection of objects that
Subject: Re: Multibox intial selection problem
A cleaner (IMHO) way for generating such select in HTML would be :
html:select property=monthstosave
html:options collection=monthstosaveValues
property=value
labelProperty=label/
/html:select
... where
,
thx
gnan
- Original Message -
From: Nicolas De Loof [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, June 24, 2002 7:26 PM
Subject: Re: Multibox intial selection problem
http://marc.theaimsgroup.com/?l=struts-userm=102449257508421w=2
http
:Re: Multibox intial selection problem
Hi
I saw the mails in Archive in that uyou have said a some code has to be
inclued in the Action Class I am little bit Confused on this .Whether i
should put the code in the Action class before forwarding it to the jsp or
Action Class which we specify
Marcelo == Marcelo Caldas [EMAIL PROTECTED] writes:
Marcelo Hei,
Marcelo Can somebody give me an example on how to use the html:multibox tag...
Marcelo It's complaining that can't find the getter method...
Marcelo that's what I got so far:
Marcelo on the JSP:
Marcelo
:00 PM
To: Struts Users Mailing List
Subject: RE: Multibox in iterate
You should add the name='role' attribute in the html:multibox tag.
When you think about it, it is logical.
hth,
tomK
-Original Message-
From: Viljoen, Danie [mailto:[EMAIL PROTECTED]]
Sent: woensdag 9 januari 2002
make sure in your ActionForm class, you have an attribute called testChecked
and coresponding getter/setter
Yong Chen
-Original Message-
From: Viljoen, Danie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 6:54 AM
To: 'Struts Users Mailing List'
Subject: Multibox in
Raul,
Did you did you work out the solution to this,
I think what you need to do is for the Form object that you've defined
that maps this form you need a property that relates to the multiple box
e.g.
if i have a jsp mainmenu.jsp
with
html:select property=blah multiple=true size=4
You need to implement the reset() method, as Erik has mentioned. It was
created to solve exactly the problem you are having.
--
Martin Cooper
- Original Message -
From: Krueger, Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 11:59 AM
Subject: RE: multibox
builds are running on a different branch or
something).
Erik
- Original Message -
From: Krueger, Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 7:07 AM
Subject: RE: multibox and reset() ERIK
Erik,
I believe your patch will solve my problem but I'm not sure
this.
Thanks
Jeff
-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 8:49 AM
To: [EMAIL PROTECTED]
Subject: Re: multibox and reset() ERIK
Jeff,
No, my patch did not fix this particular case. Here is what is happening
in your scenario: checkboxes do
]
Sent: Tuesday, October 02, 2001 7:49 AM
Subject: RE: multibox and reset() ERIK
Thanks Erik for the extra info. I was thinking that was the problem I was
having. One idea that I had was to check in my action class to see if any
check boxes were on the request and if not then call the set
Yes, that's what I figured out at last.
One more question:
I notice that even objects in session scope cannot be used by different frames.
When my frameset is built, the first frame contains a jsp page which is called with a
parameter. This page puts the parameter in session scope.
The second
I don't have a direct solution to our problem but why not submit the
checkbox form, targeted to the frame that's supposed to display the total?
An action can count the check boxes and display the total page without
having to refresh the form every time. The form can also use a JavaScript
timer to
The signature for reset() is the following:
void reset(ActionMapping, HttpServletRequest)
I don't know whether setting the array reference is null is enough, or you
truly need to create a zero-length array like in your example below.
I set mine to null, it seemed to work.
- Original
PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 14, 2001 10:12 AM
Subject: Re: multibox and reset()
The signature for reset() is the following:
void reset(ActionMapping, HttpServletRequest)
I don't know whether setting the array reference is null is enough, or you
I was looking into wrong file org.apache.struts.taglib.MultiBoxTag.java
Instead of org.apache.struts.taglib.html.MultiBoxTag.java where value is
checked if it
is set in the jsp if not then uses the body content of the multibox tag
-Original Message-
From: SUHAS G. KULKARNI
a box shouldn't get
checked, and that was causing a null pointer. Anyway, thanks SO MUCH for
your replies, they helped a lot.
Thanks again,
Becky
Original Message Follows
From: Steve A Drake [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Multibox
On Thu, 21 Jun 2001, Becky Moyer wrote:
Steve,
Thanks so much for your reply, it gave me some more leads to follow. I
have been playing with this for the last 2 days...I have tried to change my
webapp to be similar to yours.
That could get ugly. =:]
I made my form have 2 string
On Tue, 19 Jun 2001, Becky Moyer wrote:
Hi all...
I've read all I can find in the archives about the html:multibox tag, and
I have gotten farther, but I still would like to ask for some help.
In my jsp, I have the following:
logic:iterate id=item1 name=entryData
html:multibox
This doesn't work yet, I submitted a patch
Vote for bug #402 at
http://nagoya.betaversion.org/bugzilla/show_bug.cgi?id=402
With my patch the usage is
logic:iterate ...
...
html:multibox property="checkbox" value="candidate"
valuePropert="candidateId"/
...
/logic:iterate
Now your form needs
Are you saying the multibox tag doesn't work at all now? From reading the
documentation, I don't
understand how it should work now.
- Original Message -
From: "Nick Chalko" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 09, 2001 3:13 PM
Subject: RE
right now multibox does not cooperate with the iterator,
The text in the value field is not evaluated, it is static.
R,
Nick
-Original Message-
From: William Jaynes [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 12:25 PM
To: [EMAIL PROTECTED]
Subject: Re: multibox
Are you
78 matches
Mail list logo