Re: Multibox problem when defaulted all on

2004-03-17 Thread David Erickson
> I don't think I explained myself quite clearly.
>
> WORKS: All the checkboxes on the form default to on.
> WORKS: User leaves all checkboxes on.
> WORKS: User turns some of the checkboxes off.
> DOESN'T WORK: User turns all of the checkboxes off.
>
> In the last situation, the form reports to the action that the marketing
> array still has the value of {"accountHolder", "user2", "user3", "user4",
> "user5"}, even though the user turned all the checkboxes off.

This is because when nothing is selected, nothing gets sent to the form to
be populated, so assuming your form is in session scope, whatever you had in
there when it was rendered, is still in there.  That's why inside the reset
method of the form you need to empty that string array.  That way if there
are value submitted they will be populated, and if there are none, it will
stay at none.
-David

>
> Wiebe
>
> -Original Message-
> From: David 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 Message - 
> From: "David Erickson" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 17, 2004 1:22 PM
> Subject: Re: Multibox problem when defaulted all on
>
>
> > 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 - 
> > From: "Wiebe de Jong" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 17, 2004 1:14 PM
> > Subject: Multibox problem when defaulted all on
> >
> >
> > > I am having a problem with multibox. I need to have a set of
checkboxes
> to
> > > default on in my form. I found and followed Ted Husted's "Struts Tip
#7
> > > <http://husted.com/struts/tips/007.html>  - Use Multibox to manage
> > > checkboxes" and everything works well, except in one condition
explained
> > > below.
> > >
> > >
> > >
> > > When everything is defaulted on, and the user checks off the boxes but
> > > leaves at least one checked on, everything works as planned. However,
if
> > all
> > > the boxes are defaulted on (as in the code below) and the user checks
> all
> > > the boxes off, the marketing array is not updated. In this case, the
> form
> > > ends up telling me that the checkboxes are all on.
> > >
> > >
> > >
> > > How do I get it to work properly in this situation?
> > >
> > >
> > >
> > > -
> > >
> > > Form:
> > >
> > >
> > >
> > > public void reset(ActionMapping mapping, HttpServletRequest request) {
> > >
> > > ...
> > >
> > >   marketing = marketingItems;
> > >
> > > }
> > >
> > >
> > >
> > > private String[] marketing = {};
> > >
> > > private String[] marketingItems =
> > > {"accountHolder","user2","user3","user4","user5"};
> > >
> > > public String[] getMarketing() { return this.marketing; }
> > >
> > > public void setMarketing(String[] marketing) { this.marketing =
> > marketing; }
> > >
> > >
> > >
> > > -
> > >
> > > Jsp:
> > >
> > >
> > >
> > > 
> > >
> > > ...
> > >
> > > 
> > >
> > > ...
> > >
> > > 
> > >
> > > ...
> > >
> > > 
> > >
> > > ...
> > >
> > > 
> > >
> > >
> > >
> > > -
> > >
> > > Action:
> > >
> > >
> > >
> > > String[] marketing = form.getMarketing();
> > >
> > > log.debug("marketing " + marketing.length);
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox problem when defaulted all on

2004-03-17 Thread Wiebe de Jong
I don't think I explained myself quite clearly. 

WORKS: All the checkboxes on the form default to on.
WORKS: User leaves all checkboxes on.
WORKS: User turns some of the checkboxes off.
DOESN'T WORK: User turns all of the checkboxes off.

In the last situation, the form reports to the action that the marketing
array still has the value of {"accountHolder", "user2", "user3", "user4",
"user5"}, even though the user turned all the checkboxes off.

Wiebe

-Original Message-
From: David 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 Message - 
From: "David Erickson" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 17, 2004 1:22 PM
Subject: Re: Multibox problem when defaulted all on


> 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 - 
> From: "Wiebe de Jong" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 17, 2004 1:14 PM
> Subject: Multibox problem when defaulted all on
>
>
> > I am having a problem with multibox. I need to have a set of checkboxes
to
> > default on in my form. I found and followed Ted Husted's "Struts Tip #7
> > <http://husted.com/struts/tips/007.html>  - Use Multibox to manage
> > checkboxes" and everything works well, except in one condition explained
> > below.
> >
> >
> >
> > When everything is defaulted on, and the user checks off the boxes but
> > leaves at least one checked on, everything works as planned. However, if
> all
> > the boxes are defaulted on (as in the code below) and the user checks
all
> > the boxes off, the marketing array is not updated. In this case, the
form
> > ends up telling me that the checkboxes are all on.
> >
> >
> >
> > How do I get it to work properly in this situation?
> >
> >
> >
> > -
> >
> > Form:
> >
> >
> >
> > public void reset(ActionMapping mapping, HttpServletRequest request) {
> >
> > ...
> >
> >   marketing = marketingItems;
> >
> > }
> >
> >
> >
> > private String[] marketing = {};
> >
> > private String[] marketingItems =
> > {"accountHolder","user2","user3","user4","user5"};
> >
> > public String[] getMarketing() { return this.marketing; }
> >
> > public void setMarketing(String[] marketing) { this.marketing =
> marketing; }
> >
> >
> >
> > -
> >
> > Jsp:
> >
> >
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> >
> >
> > -
> >
> > Action:
> >
> >
> >
> > String[] marketing = form.getMarketing();
> >
> > log.debug("marketing " + marketing.length);
> >
> >
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox problem when defaulted all on

2004-03-17 Thread Wendy Smoak
> 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 
> first time its holding the default values.

If you keep your forms in session scope, this might be a problem if the
user "starts over" with this form at some point.  If there's already an
instance of the form in session scope, it will be reused, so the
constructor will not be called.  So if you're going to do this, you
might want to remove the form from the session when the user is
"finished" with it, whatever that means in this particular app.  Then if
they "start over" the framework will make a new form.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multibox problem when defaulted all on

2004-03-17 Thread David Erickson
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 problem when defaulted all on


> 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 - 
> From: "Wiebe de Jong" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, March 17, 2004 1:14 PM
> Subject: Multibox problem when defaulted all on
>
>
> > I am having a problem with multibox. I need to have a set of checkboxes
to
> > default on in my form. I found and followed Ted Husted's "Struts Tip #7
> > <http://husted.com/struts/tips/007.html>  - Use Multibox to manage
> > checkboxes" and everything works well, except in one condition explained
> > below.
> >
> >
> >
> > When everything is defaulted on, and the user checks off the boxes but
> > leaves at least one checked on, everything works as planned. However, if
> all
> > the boxes are defaulted on (as in the code below) and the user checks
all
> > the boxes off, the marketing array is not updated. In this case, the
form
> > ends up telling me that the checkboxes are all on.
> >
> >
> >
> > How do I get it to work properly in this situation?
> >
> >
> >
> > -
> >
> > Form:
> >
> >
> >
> > public void reset(ActionMapping mapping, HttpServletRequest request) {
> >
> > ...
> >
> >   marketing = marketingItems;
> >
> > }
> >
> >
> >
> > private String[] marketing = {};
> >
> > private String[] marketingItems =
> > {"accountHolder","user2","user3","user4","user5"};
> >
> > public String[] getMarketing() { return this.marketing; }
> >
> > public void setMarketing(String[] marketing) { this.marketing =
> marketing; }
> >
> >
> >
> > -
> >
> > Jsp:
> >
> >
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> > ...
> >
> > 
> >
> >
> >
> > -
> >
> > Action:
> >
> >
> >
> > String[] marketing = form.getMarketing();
> >
> > log.debug("marketing " + marketing.length);
> >
> >
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multibox problem when defaulted all on

2004-03-17 Thread David Erickson
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 - 
From: "Wiebe de Jong" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 17, 2004 1:14 PM
Subject: Multibox problem when defaulted all on


> I am having a problem with multibox. I need to have a set of checkboxes to
> default on in my form. I found and followed Ted Husted's "Struts Tip #7
>   - Use Multibox to manage
> checkboxes" and everything works well, except in one condition explained
> below.
>
>
>
> When everything is defaulted on, and the user checks off the boxes but
> leaves at least one checked on, everything works as planned. However, if
all
> the boxes are defaulted on (as in the code below) and the user checks all
> the boxes off, the marketing array is not updated. In this case, the form
> ends up telling me that the checkboxes are all on.
>
>
>
> How do I get it to work properly in this situation?
>
>
>
> -
>
> Form:
>
>
>
> public void reset(ActionMapping mapping, HttpServletRequest request) {
>
> ...
>
>   marketing = marketingItems;
>
> }
>
>
>
> private String[] marketing = {};
>
> private String[] marketingItems =
> {"accountHolder","user2","user3","user4","user5"};
>
> public String[] getMarketing() { return this.marketing; }
>
> public void setMarketing(String[] marketing) { this.marketing =
marketing; }
>
>
>
> -
>
> Jsp:
>
>
>
> 
>
> ...
>
> 
>
> ...
>
> 
>
> ...
>
> 
>
> ...
>
> 
>
>
>
> -
>
> Action:
>
>
>
> String[] marketing = form.getMarketing();
>
> log.debug("marketing " + marketing.length);
>
>
>
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox and selected values

2004-03-15 Thread Craig Tataryn
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 (execute if subclassing normal Action) method.  I suppose you could do 
the same as
well and add a get/set UserSession property on your a subclassed ActionForm.  Not sure 
how great an
option that is?

Here's what my code looked like:

protected ActionForward dispatchMethod(
ActionMapping mappings,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
String methodToCall)
throws Exception {

if (form instanceof ApptiusForm) {
//here's where I grab some user session variables and present them to my form bean

((ApptiusForm)form).setSessionUserName((String)request.getSession().getAttribute(POActionServlet.USER_KEY));

((ApptiusForm)form).setSessionUserId((String)request.getSession().getAttribute(POActionServlet.USERID_KEY));
}

String dispatchTo = ApptiusUtils.isNull(methodToCall,"initialize");
ActionForward forward = null;

try {
forward = super.dispatchMethod(mappings, form, request, response, "do" 
+
ApptiusUtils.UCaseFirst(dispatchTo));
} catch (Exception e){
ApptiusLog.logError(e, this.getClass().getName() + "::" + "do" +
ApptiusUtils.UCaseFirst(methodToCall) + " does not exist, or an error occured within 
that function,
check stack trace below");
throw e;
}

if (forward == null) {
return mappings.findForward(dispatchTo);
} else {
return forward;
}
}


Craig.


On Mon, 15 Mar 2004 10:13:41 -0700, Wendy Smoak wrote:

> 
> > 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 unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox and selected values

2004-03-15 Thread Wendy Smoak
> 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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox and selected values

2004-03-15 Thread Craig Tataryn
this.servlet.getServletContext().getAttribute() should give you access to beans in the 
user session.

Craig.

On Mon, 15 Mar 2004 11:53:13 -0500, "Amish Patel" wrote:

> 
> 
> 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 values
> >Date: Mon, 15 Mar 2004 10:36:58 -0600 (CST)
> >
> >I've done this in the past within an ActionForm like so:
> >
> >this.servlet.getServletContext()
> >
> >Craig.
> >
> >
> >On Mon, 15 Mar 2004 10:40:09 -0500, "Saul Q Yuan" wrote:
> >
> > >
> > > I am not sure you can get the session directly in the form bean,
> > > however, you can get the current session in your action 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 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 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: 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
> > > > >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 user,
> > > > >and set the roles to the selectedRoles in the form bean.
> > > > >
> > > > >HTH,
> > > > >Saul
> > > > >
> > > > >   - Original Message -
> > > > >   From: Amish Patel
> > > > >   To: [EMAIL PROTECTED]
> > > > >   Sent: Sunday, March 14, 2004 11:59 AM
> > > > >   Subject: Multibox and selected values
> > > > >
> > > > >
> > > > >   Hello All,
> > > > >
> > > > >   I am running into this problem, that I am not able figure
> > > > out how to
> > > > >do
> > > > >it
> > > > >   properly.  I have searched the web and have not found a
> > > > decent example.
> > > > >   What I am trying to do is use html:multibox taglib to
> > > > display a set of
> > > > >   checkboxes.  These check boxes represent the user's security
> > > > >preferences.
> > > > >   So if the user has a particular security token, then the
> > > > respective
> > > > >check
> > > > >   box should be checked.
> > > > >
> > > > >   In order for this to work properly, I have to get two
> > > > things, all the
> > > > >   security tokens that exits in the system.  And I  have to get the
> > > > >security
> > > > >   tokens that the user already has.  In my ActionForm, I
> > > > have two methods:
> > > > >   one that gets all the security tokens in the system and
> > > > second that gets
> > > > >   only the tokens that the user has.   The following is
> > > > what I am using in
> > > > >my
> > > > >   jsp to display checkboxes.
> > > > >
> > > > >> > > >   id="eleme

RE: Multibox and selected values

2004-03-15 Thread Saul Q Yuan
Well the idea is rather than accessing this jsp page directly, try
accessing it through an action mapping, say /userInfo.do, so it goes
through an Action first before landing on the jsp page. In the Action
class, you can do all the data preparation work as discussed in previous
emails.


> -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
> 
>id="element">
>  
>   
>  
> 
>  
>
> 
> How can I pass the user object to my associateUserRoleForm 
> when there is no 
> action invoked when the page is loaded.  Lets say that when 
> the page is 
> loaded an action is invoked, how do I get the 
> associateUserRoleForm and make 
> sure that when the taglib is invoked on my page that same instance of 
> associateUserRoleForm 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 the session directly in the form bean, 
> >however, you can get the current session in your action 
> 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 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 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: 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
> > > >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 user,
> > > >and set the roles to the selectedRoles in the form bean.
> > > >
> > > >HTH,
> > > >Saul
> > > >
> > > >   - Original Message -
> > > >   From: Amish Patel
> > > >   To: [EMAIL PROTECTED]
> > > >   Sent: Sunday, March 14, 2004 11:59 AM
> > > >   Subject: Multibox and selected values
> > > >
> > > >
> > > >   Hello All,
> > > >
> > > >   I am running into this problem, that I am not able figure
> > > out how to
> > > >do
> > > >it
> > > >   properly.  I have searched the web and have not found a
> > > decent example.
> > > >   What I am trying to do is use html:multibox taglib to
> > > display a set of
> > > >   checkboxes.  These check boxes represent the user's security 
> > > >preferences.
> > > >   So if the user has a particular security token, then the
> > > respective
> > > >check
> > > >   box should be checked.
> > > >
> > > >   In order for this to work properly, I have to get two
> > > things, all the
> > > >   security tokens that exits in the system.  And I  have to get 
> > > >the security
> > > >   tokens that the user already has.  In my ActionForm, I
> > > have two methods:
> > > >   one that gets all the security tokens in the system and
> > > second that gets
> > > >   only the tokens that the user has.   The following is
> > > what I am us

RE: Multibox and selected values

2004-03-15 Thread Amish Patel
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 values
Date: Mon, 15 Mar 2004 10:36:58 -0600 (CST)
I've done this in the past within an ActionForm like so:

this.servlet.getServletContext()

Craig.

On Mon, 15 Mar 2004 10:40:09 -0500, "Saul Q Yuan" wrote:

>
> I am not sure you can get the session directly in the form bean,
> however, you can get the current session in your action 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 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 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: 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
> > >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 user,
> > >and set the roles to the selectedRoles in the form bean.
> > >
> > >HTH,
> > >Saul
> > >
> > >   - Original Message -
> > >   From: Amish Patel
> > >   To: [EMAIL PROTECTED]
> > >   Sent: Sunday, March 14, 2004 11:59 AM
> > >   Subject: Multibox and selected values
> > >
> > >
> > >   Hello All,
> > >
> > >   I am running into this problem, that I am not able figure
> > out how to
> > >do
> > >it
> > >   properly.  I have searched the web and have not found a
> > decent example.
> > >   What I am trying to do is use html:multibox taglib to
> > display a set of
> > >   checkboxes.  These check boxes represent the user's security
> > >preferences.
> > >   So if the user has a particular security token, then the
> > respective
> > >check
> > >   box should be checked.
> > >
> > >   In order for this to work properly, I have to get two
> > things, all the
> > >   security tokens that exits in the system.  And I  have to get the
> > >security
> > >   tokens that the user already has.  In my ActionForm, I
> > have two methods:
> > >   one that gets all the security tokens in the system and
> > second that gets
> > >   only the tokens that the user has.   The following is
> > what I am using in
> > >my
> > >   jsp to display checkboxes.
> > >
> > >> >   id="element">
> > > 
> > >  
> > > 
> > > 
> > > 
> > >   
> > >
> > >
> > >   Right now I am able to get allRoles successfully, but in order to
> > >retrieve
> > >   the selectedRoles, I need a way such that my ActionForm
> > >   (associateUserRoleForm) can get hold of this user or this
> > user's id,
> > >which
> > >   is already in the session.  Once I get this I can then
> > display all the
> > >   security tokens and check those tokens that the user already has.
> > >
> > >   How can I do this?  Am I on the right track or is there a
> > better way
> > >to
> > >do
> > >   this?
> > >
> > >   Thank You very much for your help!
> > >   -Semplice
> > >
> > >   _
> > >   Get business advice and resources to improve your work life, from
> > >bCentral.
> > >   http://special.msn.com/bcentral/loudclear.armx
> &

RE: Multibox and selected values

2004-03-15 Thread Craig Tataryn
I've done this in the past within an ActionForm like so:

this.servlet.getServletContext()

Craig.


On Mon, 15 Mar 2004 10:40:09 -0500, "Saul Q Yuan" wrote:

> 
> I am not sure you can get the session directly in the form bean,
> however, you can get the current session in your action 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 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 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: 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 
> > >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 user, 
> > >and set the roles to the selectedRoles in the form bean.
> > >
> > >HTH,
> > >Saul
> > >
> > >   - Original Message -
> > >   From: Amish Patel
> > >   To: [EMAIL PROTECTED]
> > >   Sent: Sunday, March 14, 2004 11:59 AM
> > >   Subject: Multibox and selected values
> > >
> > >
> > >   Hello All,
> > >
> > >   I am running into this problem, that I am not able figure 
> > out how to 
> > >do
> > >it
> > >   properly.  I have searched the web and have not found a 
> > decent example.
> > >   What I am trying to do is use html:multibox taglib to 
> > display a set of
> > >   checkboxes.  These check boxes represent the user's security 
> > >preferences.
> > >   So if the user has a particular security token, then the 
> > respective 
> > >check
> > >   box should be checked.
> > >
> > >   In order for this to work properly, I have to get two 
> > things, all the
> > >   security tokens that exits in the system.  And I  have to get the
> > >security
> > >   tokens that the user already has.  In my ActionForm, I 
> > have two methods:
> > >   one that gets all the security tokens in the system and 
> > second that gets
> > >   only the tokens that the user has.   The following is 
> > what I am using in 
> > >my
> > >   jsp to display checkboxes.
> > >
> > >> >   id="element">
> > > 
> > >  
> > > 
> > > 
> > > 
> > >   
> > >
> > >
> > >   Right now I am able to get allRoles successfully, but in order to
> > >retrieve
> > >   the selectedRoles, I need a way such that my ActionForm
> > >   (associateUserRoleForm) can get hold of this user or this 
> > user's id, 
> > >which
> > >   is already in the session.  Once I get this I can then 
> > display all the
> > >   security tokens and check those tokens that the user already has.
> > >
> > >   How can I do this?  Am I on the right track or is there a 
> > better way 
> > >to
> > >do
> > >   this?
> > >
> > >   Thank You very much for your help!
> > >   -Semplice
> > >
> > >   _
> > >   Get business advice and resources to improve your work life, from
> > >bCentral.
> > >   http://special.msn.com/bcentral/loudclear.armx
> > >
> > >
> > >   
> > -
> > >   To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >   For additional commands, e-mail: 
> > [EMAIL PROTECTED]
> > 
> > _
> > Find things fast with the new MSN Toolbar - includes FREE 
> > pop-up blocking! 
> > http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox and selected values

2004-03-15 Thread Amish Patel
How can I do what you are telling me do. Look at my code



 

   

  
How can I pass the user object to my associateUserRoleForm when there is no 
action invoked when the page is loaded.  Lets say that when the page is 
loaded an action is invoked, how do I get the associateUserRoleForm and make 
sure that when the taglib is invoked on my page that same instance of 
associateUserRoleForm 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 the session directly in the form bean,
however, you can get the current session in your action 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 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 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: 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
> >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 user,
> >and set the roles to the selectedRoles in the form bean.
> >
> >HTH,
> >Saul
> >
> >   - Original Message -
> >   From: Amish Patel
> >   To: [EMAIL PROTECTED]
> >   Sent: Sunday, March 14, 2004 11:59 AM
> >   Subject: Multibox and selected values
> >
> >
> >   Hello All,
> >
> >   I am running into this problem, that I am not able figure
> out how to
> >do
> >it
> >   properly.  I have searched the web and have not found a
> decent example.
> >   What I am trying to do is use html:multibox taglib to
> display a set of
> >   checkboxes.  These check boxes represent the user's security
> >preferences.
> >   So if the user has a particular security token, then the
> respective
> >check
> >   box should be checked.
> >
> >   In order for this to work properly, I have to get two
> things, all the
> >   security tokens that exits in the system.  And I  have to get the
> >security
> >   tokens that the user already has.  In my ActionForm, I
> have two methods:
> >   one that gets all the security tokens in the system and
> second that gets
> >   only the tokens that the user has.   The following is
> what I am using in
> >my
> >   jsp to display checkboxes.
> >
> >>   id="element">
> > 
> >  
> > 
> > 
> > 
> >   
> >
> >
> >   Right now I am able to get allRoles successfully, but in order to
> >retrieve
> >   the selectedRoles, I need a way such that my ActionForm
> >   (associateUserRoleForm) can get hold of this user or this
> user's id,
> >which
> >   is already in the session.  Once I get this I can then
> display all the
> >   security tokens and check those tokens that the user already has.
> >
> >   How can I do this?  Am I on the right track or is there a
> better way
> >to
> >do
> >   this?
> >
> >   Thank You very much for your help!
> >   -Semplice
> >
> >   _
> >   Get business advice and resources to improve your work life, from
> >bCentral.
> >   http://special.msn.com/bcentral/loudclear.armx
> >
> >
> >
> -
> >   To unsubscribe, e-mail: [EMAIL PROTECTED]
> >   For additional commands, e-mail:
> [EMAIL PROTECTED]
>
> _
> Find things fast with the new MSN Toolbar - includes FREE
> pop-up blocking!
&

RE: Multibox and selected values

2004-03-15 Thread Saul Q Yuan
I am not sure you can get the session directly in the form bean,
however, you can get the current session in your action 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 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 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: 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 
> >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 user, 
> >and set the roles to the selectedRoles in the form bean.
> >
> >HTH,
> >Saul
> >
> >   - Original Message -
> >   From: Amish Patel
> >   To: [EMAIL PROTECTED]
> >   Sent: Sunday, March 14, 2004 11:59 AM
> >   Subject: Multibox and selected values
> >
> >
> >   Hello All,
> >
> >   I am running into this problem, that I am not able figure 
> out how to 
> >do
> >it
> >   properly.  I have searched the web and have not found a 
> decent example.
> >   What I am trying to do is use html:multibox taglib to 
> display a set of
> >   checkboxes.  These check boxes represent the user's security 
> >preferences.
> >   So if the user has a particular security token, then the 
> respective 
> >check
> >   box should be checked.
> >
> >   In order for this to work properly, I have to get two 
> things, all the
> >   security tokens that exits in the system.  And I  have to get the
> >security
> >   tokens that the user already has.  In my ActionForm, I 
> have two methods:
> >   one that gets all the security tokens in the system and 
> second that gets
> >   only the tokens that the user has.   The following is 
> what I am using in 
> >my
> >   jsp to display checkboxes.
> >
> >>   id="element">
> > 
> >  
> > 
> > 
> > 
> >   
> >
> >
> >   Right now I am able to get allRoles successfully, but in order to
> >retrieve
> >   the selectedRoles, I need a way such that my ActionForm
> >   (associateUserRoleForm) can get hold of this user or this 
> user's id, 
> >which
> >   is already in the session.  Once I get this I can then 
> display all the
> >   security tokens and check those tokens that the user already has.
> >
> >   How can I do this?  Am I on the right track or is there a 
> better way 
> >to
> >do
> >   this?
> >
> >   Thank You very much for your help!
> >   -Semplice
> >
> >   _
> >   Get business advice and resources to improve your work life, from
> >bCentral.
> >   http://special.msn.com/bcentral/loudclear.armx
> >
> >
> >   
> -
> >   To unsubscribe, e-mail: [EMAIL PROTECTED]
> >   For additional commands, e-mail: 
> [EMAIL PROTECTED]
> 
> _
> Find things fast with the new MSN Toolbar - includes FREE 
> pop-up blocking! 
> http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multibox and selected values

2004-03-14 Thread Amish Patel
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 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: 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 
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 user, 
and set the roles to the selectedRoles in the form bean.

HTH,
Saul
  - Original Message -
  From: Amish Patel
  To: [EMAIL PROTECTED]
  Sent: Sunday, March 14, 2004 11:59 AM
  Subject: Multibox and selected values
  Hello All,

  I am running into this problem, that I am not able figure out how to do 
it
  properly.  I have searched the web and have not found a decent example.
  What I am trying to do is use html:multibox taglib to display a set of
  checkboxes.  These check boxes represent the user's security 
preferences.
  So if the user has a particular security token, then the respective 
check
  box should be checked.

  In order for this to work properly, I have to get two things, all the
  security tokens that exits in the system.  And I  have to get the 
security
  tokens that the user already has.  In my ActionForm, I have two methods:
  one that gets all the security tokens in the system and second that gets
  only the tokens that the user has.   The following is what I am using in 
my
  jsp to display checkboxes.

  

 



  
  Right now I am able to get allRoles successfully, but in order to 
retrieve
  the selectedRoles, I need a way such that my ActionForm
  (associateUserRoleForm) can get hold of this user or this user's id, 
which
  is already in the session.  Once I get this I can then display all the
  security tokens and check those tokens that the user already has.

  How can I do this?  Am I on the right track or is there a better way to 
do
  this?

  Thank You very much for your help!
  -Semplice
  _
  Get business advice and resources to improve your work life, from 
bCentral.
  http://special.msn.com/bcentral/loudclear.armx

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
_
Find things fast with the new MSN Toolbar – includes FREE pop-up blocking! 
http://clk.atdmt.com/AVE/go/onm00200414ave/direct/01/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Multibox and selected values

2004-03-14 Thread Saul Q Yuan
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 user, and set the roles to the 
selectedRoles in the form bean.

HTH,
Saul

  - Original Message - 
  From: Amish Patel 
  To: [EMAIL PROTECTED] 
  Sent: Sunday, March 14, 2004 11:59 AM
  Subject: Multibox and selected values


  Hello All,

  I am running into this problem, that I am not able figure out how to do it 
  properly.  I have searched the web and have not found a decent example.  
  What I am trying to do is use html:multibox taglib to display a set of 
  checkboxes.  These check boxes represent the user's security preferences.  
  So if the user has a particular security token, then the respective check 
  box should be checked.

  In order for this to work properly, I have to get two things, all the 
  security tokens that exits in the system.  And I  have to get the security 
  tokens that the user already has.  In my ActionForm, I have two methods:  
  one that gets all the security tokens in the system and second that gets 
  only the tokens that the user has.   The following is what I am using in my 
  jsp to display checkboxes.

  

 



  


  Right now I am able to get allRoles successfully, but in order to retrieve 
  the selectedRoles, I need a way such that my ActionForm 
  (associateUserRoleForm) can get hold of this user or this user's id, which 
  is already in the session.  Once I get this I can then display all the 
  security tokens and check those tokens that the user already has.

  How can I do this?  Am I on the right track or is there a better way to do 
  this?

  Thank You very much for your help!
  -Semplice

  _
  Get business advice and resources to improve your work life, from bCentral. 
  http://special.msn.com/bcentral/loudclear.armx


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

RE: Multibox and Validation

2004-01-23 Thread Justin Miller
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 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] 
Subject: Multibox and Validation


Hi all

Is there an out of the box struts-validator way to check to see if at
least one of x number of checkboxes has been checked using the
html:multibox?

I have been attempting to use the required and requiredif rules to no
avail.

Background:

Struts 1.1
DynaValidatorActionForm
Tomcat 4.1

Thanks in advance

Justin

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox and Validation

2004-01-22 Thread Saul Q Yuan
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]
Subject: Multibox and Validation


Hi all

Is there an out of the box struts-validator way to check to see if at
least one of x number of checkboxes has been checked using the
html:multibox?

I have been attempting to use the required and requiredif rules to no
avail.

Background:

Struts 1.1
DynaValidatorActionForm
Tomcat 4.1

Thanks in advance

Justin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multibox - Null attribute name ServletException - SOLVED

2003-11-06 Thread ZYD
I change html:iterate tag to:



the ="multiboxTest"  is the ActionForm bean's name in struts-config.xml.

and add getter/setter for items, now it works.

Thanks.

bruce


- Original Message - 
From: "ZYD" <[EMAIL PROTECTED]>
To: "Struts Users 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 PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 06, 2003 11:04 PM
> Subject: Re: multibox - Null attribute name ServletException
> 
> 
> > 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 multibox. I copied the code snippet from Struts in Action,
> > but I got:
> > > [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute
> > name'
> > > ---
> > > This is my multiboxTest.jsp:
> > >
> > > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >  
> > >   
> > >  
> > >  
> > > 
> > >
> > > 
> > > 
> > >  
> > >  
> > >
> > >   
> > >    
> > >   
> > >
> > >   
> > >  
> > > 
> > > 
> > > 
> > > ---
> > > This is my ActionForm: MultiboxForm .java
> > >
> > > public class MultiboxForm extends ActionForm
> > > {
> > >  private String[] selectedItems = {};
> > >  private String[] items = { "UPS", "FedEx", "Airborne" };
> > >  public String[] getSelectedItems()
> > >  {
> > >   return this.selectedItems;
> > >  }
> > >  public void setSelectedItems(String[] selectedItems)
> > >  {
> > >   this.selectedItems = selectedItems;
> > >  }
> > >
> > >  public ActionErrors validate(
> > >   ActionMapping mapping,
> > >   HttpServletRequest request)
> > >  {
> > >   ActionErrors errors = new ActionErrors();
> > >   return errors;
> > >  }
> > > }
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >

Re: multibox - Null attribute name ServletException

2003-11-06 Thread ZYD
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 ServletException


> 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 multibox. I copied the code snippet from Struts in Action,
> but I got:
> > [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute
> name'
> > ---
> > This is my multiboxTest.jsp:
> >
> > <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >
> > 
> >
> > 
> >
> > 
> >  
> >   
> >  
> >  
> > 
> >
> > 
> > 
> >  
> >  
> >
> >   
> >    
> >   
> >
> >   
> >  
> > 
> > 
> > 
> > ---
> > This is my ActionForm: MultiboxForm .java
> >
> > public class MultiboxForm extends ActionForm
> > {
> >  private String[] selectedItems = {};
> >  private String[] items = { "UPS", "FedEx", "Airborne" };
> >  public String[] getSelectedItems()
> >  {
> >   return this.selectedItems;
> >  }
> >  public void setSelectedItems(String[] selectedItems)
> >  {
> >   this.selectedItems = selectedItems;
> >  }
> >
> >  public ActionErrors validate(
> >   ActionMapping mapping,
> >   HttpServletRequest request)
> >  {
> >   ActionErrors errors = new ActionErrors();
> >   return errors;
> >  }
> > }
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Re: multibox - Null attribute name ServletException

2003-11-06 Thread Firat TIRYAKI
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 multibox. I copied the code snippet from Struts in Action,
but I got:
> [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute
name'
> ---
> This is my multiboxTest.jsp:
>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> 
>
> 
>
> 
>  
>   
>  
>  
> 
>
> 
> 
>  
>  
>
>   
>    
>   
>
>   
>  
> 
> 
> 
> ---
> This is my ActionForm: MultiboxForm .java
>
> public class MultiboxForm extends ActionForm
> {
>  private String[] selectedItems = {};
>  private String[] items = { "UPS", "FedEx", "Airborne" };
>  public String[] getSelectedItems()
>  {
>   return this.selectedItems;
>  }
>  public void setSelectedItems(String[] selectedItems)
>  {
>   this.selectedItems = selectedItems;
>  }
>
>  public ActionErrors validate(
>   ActionMapping mapping,
>   HttpServletRequest request)
>  {
>   ActionErrors errors = new ActionErrors();
>   return errors;
>  }
> }


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Multibox over a collection

2003-07-09 Thread Alex Shneyderman
> 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 assign a different value (suppose index value) to the checkbox of
different row. Your form that accepts values from html request will need
to have String [] property that will be filled with indexes of checked
rows upon submission.

Alex.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multibox persistence problem

2003-06-18 Thread David Chelimsky
I was under the impression that we were talking about the question of 
persisting the Collection on a validation error. You've got 
validate="false" in the mapping below, so it's not validating. If you 
set validate="true", I'm almost certain that you'll lose allRoles unless 
you set the scope to "session". Please yet us know if you get a 
different result.

Thanks,
David
Mykola Ostapchuk wrote:

Well, you don't have to use session scope and you can clear Collection in
reset() method.
registration.jsp:


  
 
  
  

struts-config.xml:


  

registrationForm.java

public String[] getSelectedRoles() {
   return this.selectedRoles;
}
public void setSelectedRoles(String[] selectedRoles) {
   this.selectedRoles = selectedRoles;
}
public void reset(ActionMapping mapping, HttpServletRequest request) {
   String [] arrUserRoles={};
   this.setSelectedRoles(arrUserRoles);
}
In registrationAction - just populate selectedRoles array with "checked"
values from DB.
Populate Vector allRoles with all user Roles and put it into context:
   RolesVO curElement;
   RolesBD rolesBD = new RolesBD();
   Enumeration tempAllRoles = rolesBD.selectAllRoles().elements();
   Vector allRoles=new Vector();
   while (tempAllRoles.hasMoreElements()) {
curElement = (RolesVO)tempAllRoles.nextElement();
allRoles.addElement(new
LabelValueBean(curElement.getRoleName(),curElement.getRoleId().toString()));
   }
   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/ session scope. Can you please
post your code so I can see your solution? Thanks.
Mykola Ostapchuk wrote:

   

Thank you for help - I solved the problem.
Actually, it works with "request" scope well, no need to use session.
The problem was in my code - I didn't 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 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 options, but make sure that you DO reset all
other values besides your Collection.
3. set scope="session" as was suggested
The result is that your Collection gets set in your Action and left
alone on validation failure. The other properties are handled per the
quote you referenced below.
As for why it is that Struts doesn't repopulate the Collection for you
   

from the request, essentially it has no way of knowing that they exist
 

as they are not in the request when you submit the form. Only the values
you select are. This is not true of text inputs because they return
empty strings, but are still present in the request. I imagine something
could be added to Struts that would add a bunch of hidden fields to the
form in your .jsp that could somehow describe the type of  the members
of the Collection, and then rebuild the collection on the fly based on
those fields. Perhaps this would make more sense after java 1.5 is
released with support for typed Collections.
David

Mykola Ostapchuk wrote:



   

Doesn't work with session scope too.

"As we know, Struts redirects to the path set in the "input" attribute

 

for

 

the action if there are errors present in ActionError object.
The ActionForm object holding the user's data will still be in request.
Thus, any data entered by the user in the form will appear
 

pre-populated
 

 

in

 

the form."

All the data in  tags is pre-populated well. But
 

multibox -
 

not...
Any suggestions?


- Original Message ----- 
From: "Richard Raquepo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
 

"Mykola
 

Ostapchuk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 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 multibox to display multiple checkboxes:









Everything works fine, the only problem is - when there's a
 

validation
 



 

error



   

on my form and it's

Re: Multibox persistence problem

2003-06-18 Thread Mykola Ostapchuk
Well, you don't have to use session scope and you can clear Collection in
reset() method.

registration.jsp:


   
  
   
   


struts-config.xml:


   



registrationForm.java

 public String[] getSelectedRoles() {
return this.selectedRoles;
 }
 public void setSelectedRoles(String[] selectedRoles) {
this.selectedRoles = selectedRoles;
 }

public void reset(ActionMapping mapping, HttpServletRequest request) {
String [] arrUserRoles={};
this.setSelectedRoles(arrUserRoles);
}

In registrationAction - just populate selectedRoles array with "checked"
values from DB.
Populate Vector allRoles with all user Roles and put it into context:

RolesVO curElement;
RolesBD rolesBD = new RolesBD();
Enumeration tempAllRoles = rolesBD.selectAllRoles().elements();
Vector allRoles=new Vector();
while (tempAllRoles.hasMoreElements()) {
 curElement = (RolesVO)tempAllRoles.nextElement();
 allRoles.addElement(new
LabelValueBean(curElement.getRoleName(),curElement.getRoleId().toString()));
}
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/ session scope. Can you please
> post your code so I can see your solution? Thanks.
>
> Mykola Ostapchuk wrote:
>
> >Thank you for help - I solved the problem.
> >Actually, it works with "request" scope well, no need to use session.
> >The problem was in my code - I didn't 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 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 options, but make sure that you DO reset all
> >>other values besides your Collection.
> >>3. set scope="session" as was suggested
> >>
> >>The result is that your Collection gets set in your Action and left
> >>alone on validation failure. The other properties are handled per the
> >>quote you referenced below.
> >>
> >>As for why it is that Struts doesn't repopulate the Collection for you
> >>from the request, essentially it has no way of knowing that they exist
> >>as they are not in the request when you submit the form. Only the values
> >>you select are. This is not true of text inputs because they return
> >>empty strings, but are still present in the request. I imagine something
> >>could be added to Struts that would add a bunch of hidden fields to the
> >>form in your .jsp that could somehow describe the type of  the members
> >>of the Collection, and then rebuild the collection on the fly based on
> >>those fields. Perhaps this would make more sense after java 1.5 is
> >>released with support for typed Collections.
> >>
> >>David
> >>
> >>Mykola Ostapchuk wrote:
> >>
> >>
> >>
> >>>Doesn't work with session scope too.
> >>>
> >>>"As we know, Struts redirects to the path set in the "input" attribute
> >>>
> >>>
> >for
> >
> >
> >>>the action if there are errors present in ActionError object.
> >>>The ActionForm object holding the user's data will still be in request.
> >>>Thus, any data entered by the user in the form will appear
pre-populated
> >>>
> >>>
> >in
> >
> >
> >>>the form."
> >>>
> >>>All the data in  tags is pre-populated well. But
multibox -
> >>>not...
> >>>Any suggestions?
> >>>
> >>>
> >>>
> >>>- Original Message - 
> >>>From: "Richard Raquepo" <[EMAIL PROTECTED]>
> >>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>;
"Mykola
> >>>Ostapchuk" <[EMAIL PROTECTED]>
> >>>Sent: Tuesday, June 17, 2003 11:15 PM
> >>>Subject: Re: Multibox persisten

Re: Multibox persistence problem

2003-06-18 Thread David Chelimsky
I've only been able to make this work w/ session scope. Can you please 
post your code so I can see your solution? Thanks.

Mykola Ostapchuk wrote:

Thank you for help - I solved the problem.
Actually, it works with "request" scope well, no need to use session.
The problem was in my code - I didn't 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 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 options, but make sure that you DO reset all
other values besides your Collection.
3. set scope="session" as was suggested
The result is that your Collection gets set in your Action and left
alone on validation failure. The other properties are handled per the
quote you referenced below.
As for why it is that Struts doesn't repopulate the Collection for you
from the request, essentially it has no way of knowing that they exist
as they are not in the request when you submit the form. Only the values
you select are. This is not true of text inputs because they return
empty strings, but are still present in the request. I imagine something
could be added to Struts that would add a bunch of hidden fields to the
form in your .jsp that could somehow describe the type of  the members
of the Collection, and then rebuild the collection on the fly based on
those fields. Perhaps this would make more sense after java 1.5 is
released with support for typed Collections.
David

Mykola Ostapchuk wrote:

   

Doesn't work with session scope too.

"As we know, Struts redirects to the path set in the "input" attribute
 

for
 

the action if there are errors present in ActionError object.
The ActionForm object holding the user's data will still be in request.
Thus, any data entered by the user in the form will appear pre-populated
 

in
 

the form."

All the data in  tags is pre-populated well. But multibox -
not...
Any suggestions?


- Original Message - 
From: "Richard Raquepo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Mykola
Ostapchuk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 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 multibox to display multiple checkboxes:




 




Everything works fine, the only problem is - when there's a validation

 

error

   

on my form and it's reposted with error messages, it always return all
checkboxes unchecked (even if I check some of them before).
How could I keep checkbox values in this situation?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 

   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Multibox persistence problem

2003-06-18 Thread Mykola Ostapchuk
Thank you for help - I solved the problem.
Actually, it works with "request" scope well, no need to use session.
The problem was in my code - I didn't 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 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 options, but make sure that you DO reset all
> other values besides your Collection.
> 3. set scope="session" as was suggested
>
> The result is that your Collection gets set in your Action and left
> alone on validation failure. The other properties are handled per the
> quote you referenced below.
>
> As for why it is that Struts doesn't repopulate the Collection for you
> from the request, essentially it has no way of knowing that they exist
> as they are not in the request when you submit the form. Only the values
> you select are. This is not true of text inputs because they return
> empty strings, but are still present in the request. I imagine something
> could be added to Struts that would add a bunch of hidden fields to the
> form in your .jsp that could somehow describe the type of  the members
> of the Collection, and then rebuild the collection on the fly based on
> those fields. Perhaps this would make more sense after java 1.5 is
> released with support for typed Collections.
>
> David
>
> Mykola Ostapchuk wrote:
>
> >Doesn't work with session scope too.
> >
> >"As we know, Struts redirects to the path set in the "input" attribute
for
> >the action if there are errors present in ActionError object.
> >The ActionForm object holding the user's data will still be in request.
> >Thus, any data entered by the user in the form will appear pre-populated
in
> >the form."
> >
> >All the data in  tags is pre-populated well. But multibox -
> >not...
> >Any suggestions?
> >
> >
> >
> >- Original Message - 
> >From: "Richard Raquepo" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Mykola
> >Ostapchuk" <[EMAIL PROTECTED]>
> >Sent: Tuesday, June 17, 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 multibox to display multiple checkboxes:
> >>>
> >>>
> >>>
> >>> 
> >>>   
> >>> 
> >>> 
> >>>
> >>>
> >>>
> >>>Everything works fine, the only problem is - when there's a validation
> >>>
> >>>
> >>error
> >>
> >>
> >>>on my form and it's reposted with error messages, it always return all
> >>>checkboxes unchecked (even if I check some of them before).
> >>>
> >>>How could I keep checkbox values in this situation?
> >>>
> >>>
> >>>-
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multibox persistence problem

2003-06-17 Thread David Chelimsky
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 options, but make sure that you DO reset all 
other values besides your Collection.
3. set scope="session" as was suggested

The result is that your Collection gets set in your Action and left 
alone on validation failure. The other properties are handled per the 
quote you referenced below.

As for why it is that Struts doesn't repopulate the Collection for you 
from the request, essentially it has no way of knowing that they exist 
as they are not in the request when you submit the form. Only the values 
you select are. This is not true of text inputs because they return 
empty strings, but are still present in the request. I imagine something 
could be added to Struts that would add a bunch of hidden fields to the 
form in your .jsp that could somehow describe the type of  the members 
of the Collection, and then rebuild the collection on the fly based on 
those fields. Perhaps this would make more sense after java 1.5 is 
released with support for typed Collections.

David

Mykola Ostapchuk wrote:

Doesn't work with session scope too.

"As we know, Struts redirects to the path set in the "input" attribute for
the action if there are errors present in ActionError object.
The ActionForm object holding the user's data will still be in request.
Thus, any data entered by the user in the form will appear pre-populated in
the form."
All the data in  tags is pre-populated well. But multibox -
not...
Any suggestions?


- Original Message - 
From: "Richard Raquepo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Mykola
Ostapchuk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 17, 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 multibox to display multiple checkboxes:




  




Everything works fine, the only problem is - when there's a validation
 

error
   

on my form and it's reposted with error messages, it always return all
checkboxes unchecked (even if I check some of them before).
How could I keep checkbox values in this situation?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Multibox persistence problem

2003-06-17 Thread Richard Raquepo
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:
>
> 
> 
>  
>
>  
>  
> 
> 
>
> Everything works fine, the only problem is - when there's a validation
error
> on my form and it's reposted with error messages, it always return all
> checkboxes unchecked (even if I check some of them before).
>
> How could I keep checkbox values in this situation?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multibox?

2003-02-25 Thread Jobe, Mike [EESUS]
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
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 send me an example of a Multibox by any chance?

Thanks,
Mike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: multibox?

2003-02-25 Thread Sri Sankaran
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 send me an example of a Multibox by any chance?

Thanks,
Mike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: multibox and DynaValidatorForm

2003-01-22 Thread Durham David Cntr 805CSS/SCBE
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
> 
> 
> 
>   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 PROTECTED]
> > Subject: multibox and DynaValidatorForm
> > 
> > 
> > What type should/can I associate with multibox inputs in the 
> > form-bean declaration?
> > 
> > The docs say that the multibox property should be an Array, so I 
> > tried using java.lang.reflect.Array for the type.  This didn't 
> > work and neither java.util.Vector.  So what type should I use?  
> > It is possible to use a multibox with DynaActionForm right?
> > 
> > Also, I'm read about some kind of problem with multiboxes that 
> > requires you implement the reset method and set the array to 
> > length 0 to clear values.  I'm assuming that I would need to 
> > extend DynaValidatorForm and override reset() to do this.  Is 
> > there a better way to do this?
> > 
> > Thanks,
> > 
> > 
> > David Durham
> > NCI Information Systems
> > Scott AFB, AMC SCBE
> > 618.256.5264
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: multibox and DynaValidatorForm

2003-01-22 Thread Robert Taylor



robert

> -Original Message-
> From: Durham David Cntr 805CSS/SCBE [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 2:00 PM
> To: [EMAIL PROTECTED]
> Subject: multibox and DynaValidatorForm
> 
> 
> What type should/can I associate with multibox inputs in the 
> form-bean declaration?
> 
> The docs say that the multibox property should be an Array, so I 
> tried using java.lang.reflect.Array for the type.  This didn't 
> work and neither java.util.Vector.  So what type should I use?  
> It is possible to use a multibox with DynaActionForm right?
> 
> Also, I'm read about some kind of problem with multiboxes that 
> requires you implement the reset method and set the array to 
> length 0 to clear values.  I'm assuming that I would need to 
> extend DynaValidatorForm and override reset() to do this.  Is 
> there a better way to do this?
> 
> Thanks,
> 
> 
> David Durham
> NCI Information Systems
> Scott AFB, AMC SCBE
> 618.256.5264
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multibox and setter problem

2003-01-06 Thread AMIR-TAHMASSEB Marc
i already read this tip and do like it is said in. Unfortunatly, the
probleme is the same : 
the setter of my form is never used (so there is nothing print on screen
through the System.out.println)

can it be a problem in my config ? or because i use struts 1.02 ? or perhape
i made an error some 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:[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 i check some boxes and submit the
form, then setter of my form is never used ! So i can not get the selected
values, Can anybody help me please ?
I'm using Struts 1.02
 
thanks for you help,
 
Marc
 
Here are my codes :
 
 
___struts-config.xml :
...
  
 
 ...
  

  
 
 ...
  
...
  
  
  ...
  
...


___JSP : choix_export_util.jsp:
 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %>
...

...
 

 
   
 
   
 
 
   
 
...


___ActionForm: ExportUtilsForm.java :
 
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
 
public class ExportUtilsForm extends ActionForm {
 
protected String[] selectedAnnuaires = new String[0]; //{"REF"};
protected String[] annuaires = {"REF", "SIGAGIP", "NT",  "EXCHANGE",
"INMS", "TEL", "ORACLE"};
public String[] getSelectedAnnuaires() {
return selectedAnnuaires;
}
 
public void setSelectedAnnuaires(String[] selectedAnnuaires) {
System.out.println("->
ExportUtilsForm.setSelectedAnnuaires(selectedAnnuaires)");
this.selectedAnnuaires = selectedAnnuaires;
}
 
public String[] getAnnuaires() {
return annuaires;
}
 
public void setAnnuaires(String[] annuaires) {
this.annuaires=annuaires;
}
 
public void reset(ActionMapping mapping, HttpServletRequest request) {
   selectedAnnuaires = new String[0];
   annuaires = new String[] {"REF", "SIGAGIP", "NT", "EXCHANGE", "INMS",
"TEL", "ORACLE"};
}

 
___Perfom :
 String[] selectedAnnuaires = form.getSelectedAnnuaires();
 for (int i=0; imailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Multibox and setter problem

2003-01-06 Thread Alireza Fattahi
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 i check some boxes and submit the
form, then setter of my form is never used ! So i can not get the selected
values, Can anybody help me please ?
I'm using Struts 1.02
 
thanks for you help,
 
Marc
 
Here are my codes :
 
 
___struts-config.xml :
...
  
 
 ...
  

  
 
 ...
  
...
  
  
  ...
  
...


___JSP : choix_export_util.jsp:
 
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld"prefix="logic" %>
...

...
 

 
   
 
   
 
 
   
 
...


___ActionForm: ExportUtilsForm.java :
 
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
 
public class ExportUtilsForm extends ActionForm {
 
protected String[] selectedAnnuaires = new String[0]; //{"REF"};
protected String[] annuaires = {"REF", "SIGAGIP", "NT",  "EXCHANGE",
"INMS", "TEL", "ORACLE"};
public String[] getSelectedAnnuaires() {
return selectedAnnuaires;
}
 
public void setSelectedAnnuaires(String[] selectedAnnuaires) {
System.out.println("->
ExportUtilsForm.setSelectedAnnuaires(selectedAnnuaires)");
this.selectedAnnuaires = selectedAnnuaires;
}
 
public String[] getAnnuaires() {
return annuaires;
}
 
public void setAnnuaires(String[] annuaires) {
this.annuaires=annuaires;
}
 
public void reset(ActionMapping mapping, HttpServletRequest request) {
   selectedAnnuaires = new String[0];
   annuaires = new String[] {"REF", "SIGAGIP", "NT", "EXCHANGE", "INMS",
"TEL", "ORACLE"};
}

 
___Perfom :
 String[] selectedAnnuaires = form.getSelectedAnnuaires();
 for (int i=0; imailto:[EMAIL PROTECTED]>
For additional commands, e-mail: 




RE: multibox problem - No getter method

2002-12-30 Thread Sterin, Ilya
Make sure you have the first letter as lower case, in your jsp file, so
say...

public void setAcChecked(...)
public String[] getAcChecked(...)


in jsp make sure that it's acChecked, as it will append and get or set and
capitalize the first letter.

Ilya

-Original Message-
From: kiuma [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,
>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
>
>public class ActivityCenterForAgendaForm extends ActionForm {
>
>private String str;
>private String acChecked[];
>private Collection activityCenters;
>
>
>/** Creates a new instance of CustomerEditForm */
>public ActivityCenterForAgendaForm() {
>super();
>activityCenters = new Vector();
>resetFields();
>}
>
>/**
>* Restets all fields
>*/
>public void resetFields ()
>{
>str = "ciao";
>acChecked = new String[0];
>activityCenters.clear();
>}
>
>
>public void reset(ActionMapping mapping, HttpServletRequest req)
>{
>resetFields();
>}
>
>//Setters
>
>public void setStr(String str) {
>this.str = str;
>}
>
>public void setAcChecked(String acChecked[]) {
>this.acChecked = acChecked;
>}
>
>public void setActivityCenters(Collection activityCenters) {
>this.activityCenters = activityCenters;
>}
>
>
>//Getters
>
>public String getStr()
>{
>return this.str;
>}
>
>public String[] getAcChecked()
>{
>return acChecked;
>}
>
>public Collection getActivityCenters() {
>return this.activityCenters;
>}
>
>public int getActivityCentersSize() {
>return this.activityCenters.size();
>}
>
>
>/**
>* Called by the framework to validate the customer's data
>* @return On success returns an empty ActionErrors
>*/
>public ActionErrors validate( ActionMapping mapping,
>HttpServletRequest req) {
>ActionErrors result = new ActionErrors();
>
>return result;
>}
>}
>
>
>When I access to the relative page I have the following error:
>WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
>javax.servlet.jsp.JspException: No getter method available for property
>caChecked for bean under name org.apache.struts.taglib.html.BEAN
>at
>org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
>at
>precompiled.secure.activitycenterforagenda._jspService(activitycenterforage
nda.java:164)
>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Please help
>kiuma
>
>
>--
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>
>
>Remember:
>Peace, Love & Understanding
>Always
>
>David R
>
>
Sorry I've done it yet but nothing happens (write & rewrite makes some
misspell error ;-P)



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: multibox problem - No getter method

2002-12-30 Thread kiuma
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 element.

This is my form

public class ActivityCenterForAgendaForm extends ActionForm {

private String str;
private String acChecked[];
private Collection activityCenters;


/** Creates a new instance of CustomerEditForm */
public ActivityCenterForAgendaForm() {
super(); 
activityCenters = new Vector(); 
resetFields();
}

/**
* Restets all fields
*/
public void resetFields ()
{ 
str = "ciao";
acChecked = new String[0];
activityCenters.clear(); 
}


public void reset(ActionMapping mapping, HttpServletRequest req) 
{ 
resetFields();
}

//Setters

public void setStr(String str) { 
this.str = str;
} 

public void setAcChecked(String acChecked[]) { 
this.acChecked = acChecked;
} 

public void setActivityCenters(Collection activityCenters) { 
this.activityCenters = activityCenters;
} 


//Getters

public String getStr()
{
return this.str;
}

public String[] getAcChecked()
{
return acChecked;
}

public Collection getActivityCenters() { 
return this.activityCenters;
}

public int getActivityCentersSize() { 
return this.activityCenters.size();
}


/**
* Called by the framework to validate the customer's data
* @return On success returns an empty ActionErrors
*/
public ActionErrors validate( ActionMapping mapping, 
HttpServletRequest req) {
ActionErrors result = new ActionErrors();

return result; 
} 
}


When I access to the relative page I have the following error:
WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
javax.servlet.jsp.JspException: No getter method available for property 
caChecked for bean under name org.apache.struts.taglib.html.BEAN
at 
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
at 
precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please help
kiuma


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


Remember:
Peace, Love & Understanding
Always

David R
 

Sorry I've done it yet but nothing happens (write & rewrite makes some 
misspell error ;-P)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: multibox problem - No getter method

2002-12-30 Thread David Rothschadl

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

public class ActivityCenterForAgendaForm extends ActionForm {

private String str;
private String acChecked[];
private Collection activityCenters;


/** Creates a new instance of CustomerEditForm */
public ActivityCenterForAgendaForm() {
super(); 
activityCenters = new Vector(); 
resetFields();
}

/**
* Restets all fields
*/
public void resetFields ()
{ 
str = "ciao";
acChecked = new String[0];
activityCenters.clear(); 
}


public void reset(ActionMapping mapping, HttpServletRequest req) 
{ 
resetFields();
}

//Setters

public void setStr(String str) { 
this.str = str;
} 

public void setAcChecked(String acChecked[]) { 
this.acChecked = acChecked;
} 

public void setActivityCenters(Collection activityCenters) { 
this.activityCenters = activityCenters;
} 


//Getters

public String getStr()
{
return this.str;
}

public String[] getAcChecked()
{
return acChecked;
}

public Collection getActivityCenters() { 
return this.activityCenters;
}

public int getActivityCentersSize() { 
return this.activityCenters.size();
}


/**
* Called by the framework to validate the customer's data
* @return On success returns an empty ActionErrors
*/
public ActionErrors validate( ActionMapping mapping, 
HttpServletRequest req) {
ActionErrors result = new ActionErrors();

return result; 
} 
}


When I access to the relative page I have the following error:
WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
javax.servlet.jsp.JspException: No getter method available for property 
caChecked for bean under name org.apache.struts.taglib.html.BEAN
at 
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
at 
precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please help
kiuma


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


Remember:
Peace, Love & Understanding
Always

David R


RE: Multibox

2002-12-03 Thread shirishchandra . sakhare
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 number of checkboxes.

Ted Husted writes:

To provide different sets of labels and values, the standard LabelValueBean
class [org.apache.struts.util.LabelValueBean] (since 1.1) can be used with
the multibox control.

  

  

  
  



  Question: what is "items" ? An arraylist containing LabelValueBean's ?



  Thanks

  Don







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multibox

2002-12-03 Thread Sri Sankaran


> -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 checkboxes.
> 
> Ted Husted writes:
> 
> To provide different sets of labels and values, the standard 
> LabelValueBean class [org.apache.struts.util.LabelValueBean] 
> (since 1.1) can be used with the multibox control.
> 
>   
> 
>   
> 
>   
>   
> 
> 
> 
>   Question: what is "items" ? An arraylist containing 
> LabelValueBean's ?
> 
Not having seen the context of Ted's writing, that would be my guess.  Observe however 
that this will work only in Struts 1.1.  You've said that you are using 1.0.2
> 
> 
>   Thanks
> 
>   Don
> 
Sri
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: MultiBox problem.

2002-10-25 Thread Susan Bradeen
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 01:11 PM
Please respond to "Struts Users Mailing List"

 
To: [EMAIL PROTECTED]
cc: 
Subject:MultiBox problem.


Hi,
  I am using a multibox as follows in my JSP page:










where unAssignedorgs is an ArrayList contaning standard LabelValueBean.

when I run this I get the following error:
"Cannot serialize session attribute unAssignedOrgs".

I am using this in JBuilder 7.0.
Has anybody encountered this ?Is it because I am using an ArrayList?
Any help is highly appreciated.

thanks,
Kavitha




_
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: multibox : problem with preselected array

2002-10-25 Thread Sri Sankaran
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 form bean to some scope (request/session/application)?  If you don't and if the 
Struts framework doesn't find one in some scope it'll simply create one -- by calling 
the default constructor.

Sri

-Original Message-
From: sanjana [mailto:sanjana@;strandgenomics.com] 
Sent: Friday, October 25, 2002 5:17 AM
To: [EMAIL PROTECTED]
Subject: multibox : problem with preselected array


Hi,
 
I have been trying to use multibox and am facing a strange problem. I want a few 
values to be preselected when I load the form. If I initialize my selected string 
array in default constructor of the form then 
everything works properly and I can see those checkboxes as selected when the form 
loads. On the other hand if the selected string array is populated in an overloaded 
constructor then no checkbox is selected ?? Even setting the selected string array 
in Action class doesn't help :-(
 
Anyone where am I going wrong ? 
__
The form has :
 
 private String[] selectedItems;
 private String[] items;
 
 public void reset(ActionMapping mapping,
  javax.servlet.http.HttpServletRequest request) {
  selectedItems = new String[0];
 }
 
 public TestForm(boolean flag)
 {
  if(flag)
  {
   selectedItems = new String[1];
   selectedItems[0] = "FedEx";
   items = new String[3];
   items[0] = "FedEx";
   items[1] = "UPS";
   items[2] = "Airborne";
  }
 }
 
 and the corresponding getter ad setter methods.

the jsp has the following code :


  

   




Thanks,
Sanjana
 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!

2002-10-19 Thread Wendy Smoak
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.  If you set validate to false,
it'll stop working.

One line in your reset method will do the same thing:
   isOn = false;

The reset method will autmatically get called before the set-methods for the
successful form elements.  So if the checkbox isn't checked, the isOn
property will remain false.  If it is checked, then the setIsOn method will
be called and isOn will be set to true.

For the sake of the person who has to maintain your code later on, (not to
mention your own sanity when you look at this in six months,) use the
validate and reset methods for their intended purposes. :)

-- 
Wendy Smoak
Arizona State University IA IRM 



Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!

2002-10-19 Thread kiuma
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 null;
   }

But it's a very dirty technique of course.



Wendy Smoak wrote:

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, *nothing* related to those
checkboxes will be present in the request.

Isn't this what the "reset" method is all about?  The reset method will be
called before Struts automagically populates all of your ActionForm fields.
I can't tell what your Collection is from this post, but try clearing out
*all* of the values in the Collection that handles your checkboxes in the
reset() method of the Form.

Then, if you uncheck all of the boxes and submit, you should see that none
of them are checked when the form is redisplayed (or you use the data).

Hope that helps, 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!

2002-10-19 Thread C. Struts
Wendy's correct, according to
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#checkbox --

"WARNING: In order to correctly recognize unchecked checkboxes, the
ActionForm bean associated with this form must include a statement setting
the corresponding boolean property to false in the reset() method."

-c


- Original Message -
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, October 19, 2002 12:03 PM
Subject: RE: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!


>
> 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, *nothing* related to those
> checkboxes will be present in the request.
>
> Isn't this what the "reset" method is all about?  The reset method will be
> called before Struts automagically populates all of your ActionForm
fields.
> I can't tell what your Collection is from this post, but try clearing out
> *all* of the values in the Collection that handles your checkboxes in the
> reset() method of the Form.
>
> Then, if you uncheck all of the boxes and submit, you should see that none
> of them are checked when the form is redisplayed (or you use the data).
>
> Hope that helps,
>
> --
> Wendy Smoak
> Arizona State University PA IRM
>


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




RE: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!

2002-10-19 Thread Wendy Smoak

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, *nothing* related to those
checkboxes will be present in the request.

Isn't this what the "reset" method is all about?  The reset method will be
called before Struts automagically populates all of your ActionForm fields.
I can't tell what your Collection is from this post, but try clearing out
*all* of the values in the Collection that handles your checkboxes in the
reset() method of the Form.

Then, if you uncheck all of the boxes and submit, you should see that none
of them are checked when the form is redisplayed (or you use the data).

Hope that helps, 

-- 
Wendy Smoak
Arizona State University PA IRM 



Re: multibox, checkbox PROBLEM FOUND, SOLUTION NOT!!!

2002-10-19 Thread kiuma

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=on&action=Save

The problem is that if I have a checked value that I want to turn off 
I'll send
http://localhost:8080/webappointments/openChk.do?action=Save
the form function
   public void setIsOn( boolean isOn )
   {   
   this.isOn = isOn;
   }  
is not called and the value will not be changed.

Where am I wrong ??



kiuma wrote:

Hello agaaain,
My checkboxes both multi and normal don't suppo all empty values.
I.e. I can transmit a checked empty value, but I can't all empty values:
I REALLY don't know what to do ... leease!

--useredit_center.jsp--

<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@taglib uri="/WEB-INF/c.tld" prefix="c" %>


  
   
   
   
  
   
   
   
   
   
   
  
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

   

   
   
   
   
 

   
   
   
   
  
   
   
   
   
 
   
   
   
   
 
   
   
   
  
 
   
   
   
   
 
   
   
   
   
 
   
   
   
   
 
   
   
   
   
 
   
   
   
   
 

   
    
   
  
   
   
   

   
   
   
   
   
   
   
   
   
   
   
   
    
   
   
  
   
   
  
   
   
   
   
   

RE: multibox problem

2002-10-18 Thread Karr, David
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: multibox problem
> 
> 
> hello I can't change checkboxes values can u help me please
> 
>
> in ActionForm I have :
> 
> 
> public void setPrincipalPermissions( String principalPermissions )
> {   
> this.principalPermissions.add( principalPermissions );   
> }
> 
>  public Collection getPrincipalPermissions()
> {
> return principalPermissions;   
> }
> 
> In jsp I have
> 
>  value="${permission}"/>
>  value='${permission}'/>   
> 
> 
> But I cant change values to Form .
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multibox problem

2002-10-18 Thread kiuma
And so how can I use a collection ?
I used this but os u pointed doesn't work !






   
 
   
 
  
 
   
 



Karr, David wrote:

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: multibox problem


hello I can't change checkboxes values can u help me please

  
in ActionForm I have :


public void setPrincipalPermissions( String principalPermissions )
   {   
   this.principalPermissions.add( principalPermissions );   
   }

public Collection getPrincipalPermissions()
   {
   return principalPermissions;   
   }

In jsp I have


   
   

But I cant change values to Form .


--
To unsubscribe, e-mail:   


For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

.





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: multibox validation and collections

2002-07-28 Thread Zimmer, Robin (SSABSA)

F.Y.I. I resolved my problem by setting the 'input' value of the
struts-config action mapping to the action that initialised the form bean
(then forwards to the jsp) rather than the jsp directly. 
PS. Thanks for your response. 

-Original Message-
From: Jonathan Fuerth [mailto:[EMAIL 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 is selected. If not and ActionError is
> created.
> 
> The problem is that I now get a collection not found excpetion when
> the jsp is envoked. I solved this by making the form bean a session
> form bean, but is this the only way? If so, does anyone have any
> suggestions as to how to manage the formbeans on the session and are
> they serializable???

If your form's validate method returns errors, then the Struts
controller servlet immediately forwards the user to the page specified
in the input="xxxpage.foo" attribute for the current action in
struts-config.xml.  Your own action class is not invoked this time, so
any setup it might have done in request scope for your JSP (such as
populating lists for your dropdowns) is not performed.

Putting your setup in session scope will solve that problem, but
create another: you'll end up with a lot of JVM memory being pinned
down for lists that users don't really need anymore.. and trying to
come up with logic to clear out old lists from the session when
they're no longer needed is a losing battle. :)

I've tried to make my JSPs independent of action and form setup
(because of the way form validation works). A good clean way to do
that is to put getListOfXXX() methods on your business objects where
needed, and use those methods directly in the JSP when you need
Collections for  and .

I hope that helps, and I hope I answered your question. :)

PS: ActionForm is serializable, but I still wouldn't recommend keeping
lots of forms in session scope because of the memory issues.
Check out http://jakarta.apache.org/struts/api/index.html for 
everything you ever wanted to know about the struts classes (that's
where I went to double-check that ActionForm is serializable).

-- 
Jonathan Fuerth - SQL Power Group Inc.
(416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
Unleash the Power of your Corporate Data - http://www.sqlpower.ca/

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: multibox bug (Help needed)

2002-07-02 Thread Mark Nichols

You haven't given us enough information to solve your problem for you. I
suggest you reexamine the action that precedes this JSP to make sure that
the proper bean is placed in the proper context under the proper name.

If you want help I also suggest that you read the "How to Ask Questions"
link listed on the Struts site.



-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-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:
>
>type="ch.thales.model.Fruit">
>
> 
>   
> 
> 
>
>
>
>
>
>Where fruits is ArrayList of Beans Fruit in my form.
>
>Please, let me know what cause this error?
>
>
>
>javax.servlet.jsp.JspException: Cannot find bean under name
>org.apache.struts.taglib.html.BEAN
>at
>org.apache.struts.taglib.html.MultiboxTag.doEndTag(MultiboxTag.java:256)
>at
>jsp_servlet.__displayonecheckboxselection._jspService(__displayonecheckboxs
election.java:28
>at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a:265)
>at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a:304)
>at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a:200)
>at
>weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherIm
pl.java:215)
>at
>org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:9
72)
>at
>org.apache.struts.action.RequestProcessor.processActionForward(RequestProce
ssor.java:408)
>at
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269
)
>at
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
>at
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a:265)
>at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.jav
a:200)
>at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletC
ontext.java:2456
>at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.jav
a:2039)
>at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>Thanks.
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: multibox bug (Help needed)

2002-07-02 Thread Toni Nehme

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:
>
>type="ch.thales.model.Fruit">
>
> 
>   
> 
> 
>
>
>
>
>
>Where fruits is ArrayList of Beans Fruit in my form.
>
>Please, let me know what cause this error?
>
>
>
>javax.servlet.jsp.JspException: Cannot find bean under name 
>org.apache.struts.taglib.html.BEAN
>at 
>org.apache.struts.taglib.html.MultiboxTag.doEndTag(MultiboxTag.java:256)
>at 
>jsp_servlet.__displayonecheckboxselection._jspService(__displayonecheckboxselection.java:28
>at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
>at 
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
>at 
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:304)
>at 
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
>at 
>weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:215)
>at 
>org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972)
>at 
>org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408)
>at 
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
>at 
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
>at 
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at 
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
>at 
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
>at 
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456
>at 
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
>at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>Thanks.
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:   
>
>For additional commands, e-mail: 
>




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: multibox bug

2002-07-02 Thread Toni Nehme

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 in the top of your jsp?
>
><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
>-Original Message-
>From: Toni Nehme [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 02, 2002 11:35 AM
>To: [EMAIL PROTECTED]
>Subject: multibox bug
>
>
>Hi,
>
>I am using multibox in a Logic:iterator see below:
>
>type="ch.thales.model.Fruit">
>
>  
>
>  
>  
>
>
>
>
>
>Where fruits is ArrayList of Beans Fruit in my form.
>
>Please, let me know what cause this error?
>
>
>
>javax.servlet.jsp.JspException: Cannot find bean under name
>org.apache.struts.taglib.html.BEAN
> at
>org.apache.struts.taglib.html.MultiboxTag.doEndTag(MultiboxTag.java:256)
> at
>jsp_servlet.__displayonecheckboxselection._jspService(__displayonecheckboxse
>lection.java:28
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:265)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:304)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:200)
> at
>weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
>l.java:215)
> at
>org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
>2)
> at
>org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
>sor.java:408)
> at
>org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
> at
>org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
> at
>org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:265)
> at
>weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
>:200)
> at
>weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
>ntext.java:2456
> at
>weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
>:2039)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>Thanks.
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>DISCLAIMER: The information contained in this message is confidential and 
>is
>intended for the individual or group named above.  If the reader of this
>email transmission, or the agent responsible for forwarding it is not
>associated with the intended recipient(s), they are hereby notified that 
>any
>dissemination, distribution or copying of this communication is strictly
>prohibited.  If you have received this message in error, please notify the
>sender via return email and delete the message as well as any attachments.
>Thank you.
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: multibox bug

2002-07-02 Thread Xinhong Luo, NY

hi, did you include the following in the top of your jsp?

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

-Original Message-
From: Toni Nehme [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:35 AM
To: [EMAIL PROTECTED]
Subject: multibox bug


Hi,

I am using multibox in a Logic:iterator see below:



 
   
 
 





Where fruits is ArrayList of Beans Fruit in my form.

Please, let me know what cause this error?



javax.servlet.jsp.JspException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
at 
org.apache.struts.taglib.html.MultiboxTag.doEndTag(MultiboxTag.java:256)
at 
jsp_servlet.__displayonecheckboxselection._jspService(__displayonecheckboxse
lection.java:28
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:304)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at 
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:215)
at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:97
2)
at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProces
sor.java:408)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1109)
at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2456
at 
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)


Thanks.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:

DISCLAIMER: The information contained in this message is confidential and is
intended for the individual or group named above.  If the reader of this
email transmission, or the agent responsible for forwarding it is not
associated with the intended recipient(s), they are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited.  If you have received this message in error, please notify the
sender via return email and delete the message as well as any attachments.
Thank you.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Multibox intial selection problem

2002-06-24 Thread gnanaseelan

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 by Nico.
> I faced the same problem some time ago.
> Why don't u go to the archives and search for it
> I am sure u will get it.
> Search for "how to set  initially the value of multibox to selected."
>
> Bye.
>
> Thanks & Regards,
> Rajesh Pradhan
>
>
>  -Original 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: 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 for the suggestion,u c i am not using html:select bos but its
> html:multibox
> pls if any info let me know
>
> thx
> gnan
>
> ----- Original Message -
> From: "Susmita Pati" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 6:12 PM
> Subject: RE: Multibox intial selection problem
>
>
> > Hi
> > Do something like this:
> >
> >
> >
> >
> >  
> > 
> >   <%
> > for(int i=0;i >   %>
> >  > <%
> > if (downloadday.equals(monthstosave[i])){
> > %>selected<%}%>
> > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > <%}
> >   %>
> >   
> >
> > -Original Message-
> > From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 27, 2002 12:50 AM
> > To: Struts Users Mailing List
> > Subject: Multibox intial selection problem
> >
> >
> > Hi
> >
> > i am new to struts ,can any one suggest how could a multibox be intially
> > selected based on a condition in jsp
> >
> > Thx in advance
> > GS
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread gnanaseelan

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 (IMHO) way for generating such select in HTML would be :
>
> 
>property="value"
>   labelProperty="label"/>
> 
>
> ... where "monthstosaveValues" is a collection of objects that have
"value"
> and "label" property (attribute+getters) for your select box items (that
> could be placed in application scope if it is constant between users).
>
> If "monthstosave" property of your formBean has a value, it will be
> automatically preselected in generated HTML.
>
> You can find more about html:options use in
> http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options
>
> Nico
>
> > > Hi
> > > Do something like this:
> > >
> > >
> > >
> > >
> > >  
> > > 
> > >   <%
> > > for(int i=0;i > >   %>
> > >  > > <%
> > > if (downloadday.equals(monthstosave[i])){
> > > %>selected<%}%>
> > > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > > <%}
> > >   %>
> > >   
> > >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Multibox intial selection problem

2002-06-24 Thread Rajesh Pradhan

Hi gnan,
You have to include the code in the action class where u fwd the response to
your jsp page.

Thanks & Regards,
Rajesh Pradhan


 -Original Message-
From:   gnanaseelan [mailto:[EMAIL PROTECTED]]
Sent:   Thursday, February 28, 2002 10:54 AM
To: Struts Users Mailing List
Subject:    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 for jsp in Action Mapping.

PLs clarify,

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-user&m=102449257508421&w=2
> http://marc.theaimsgroup.com/?l=struts-user&m=102449110907004&w=2
>
> Nico
>
> - Original Message -
> From: "Rajesh Pradhan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 3:41 PM
> Subject: RE: Multibox intial selection problem
>
>
> > Hi,
> > This is already answered by Nico.
> > I faced the same problem some time ago.
> > Why don't u go to the archives and search for it
> > I am sure u will get it.
> > Search for "how to set  initially the value of multibox to selected."
> >
> > Bye.
> >
> > Thanks & Regards,
> > Rajesh Pradhan
> >
> >
> >  -Original 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: 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 for the suggestion,u c i am not using html:select bos but its
> > html:multibox
> > pls if any info let me know
> >
> > thx
> > gnan
> >
> > - Original Message -
> > From: "Susmita Pati" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Monday, June 24, 2002 6:12 PM
> > Subject: RE: Multibox intial selection problem
> >
> >
> > > Hi
> > > Do something like this:
> > >
> > >
> > >
> > >
> > >  
> > > 
> > >   <%
> > > for(int i=0;i > >   %>
> > >  > > <%
> > > if (downloadday.equals(monthstosave[i])){
> > > %>selected<%}%>
> > > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > > <%}
> > >   %>
> > >   
> > >
> > > -Original Message-
> > > From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 27, 2002 12:50 AM
> > > To: Struts Users Mailing List
> > > Subject: Multibox intial selection problem
> > >
> > >
> > > Hi
> > >
> > > i am new to struts ,can any one suggest how could a multibox be
intially
> > > selected based on a condition in jsp
> > >
> > > Thx in advance
> > > GS
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread gnanaseelan

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 for jsp in Action Mapping.

PLs clarify,

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-user&m=102449257508421&w=2
> http://marc.theaimsgroup.com/?l=struts-user&m=102449110907004&w=2
>
> Nico
>
> - Original Message -
> From: "Rajesh Pradhan" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 3:41 PM
> Subject: RE: Multibox intial selection problem
>
>
> > Hi,
> > This is already answered by Nico.
> > I faced the same problem some time ago.
> > Why don't u go to the archives and search for it
> > I am sure u will get it.
> > Search for "how to set  initially the value of multibox to selected."
> >
> > Bye.
> >
> > Thanks & Regards,
> > Rajesh Pradhan
> >
> >
> >  -Original 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: 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 for the suggestion,u c i am not using html:select bos but its
> > html:multibox
> > pls if any info let me know
> >
> > thx
> > gnan
> >
> > - Original Message -
> > From: "Susmita Pati" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Monday, June 24, 2002 6:12 PM
> > Subject: RE: Multibox intial selection problem
> >
> >
> > > Hi
> > > Do something like this:
> > >
> > >
> > >
> > >
> > >  
> > > 
> > >   <%
> > > for(int i=0;i > >   %>
> > >  > > <%
> > > if (downloadday.equals(monthstosave[i])){
> > > %>selected<%}%>
> > > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > > <%}
> > >   %>
> > >   
> > >
> > > -Original Message-
> > > From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, February 27, 2002 12:50 AM
> > > To: Struts Users Mailing List
> > > Subject: Multibox intial selection problem
> > >
> > >
> > > Hi
> > >
> > > i am new to struts ,can any one suggest how could a multibox be
intially
> > > selected based on a condition in jsp
> > >
> > > Thx in advance
> > > GS
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread gnanaseelan

Hi

   I have the multibox intial selection problem with the html:multibox
if u have any info pls let me know
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:24 PM
Subject: Re: Multibox intial selection problem


> A cleaner (IMHO) way for generating such select in HTML would be :
>
> 
>property="value"
>   labelProperty="label"/>
> 
>
> ... where "monthstosaveValues" is a collection of objects that have
"value"
> and "label" property (attribute+getters) for your select box items (that
> could be placed in application scope if it is constant between users).
>
> If "monthstosave" property of your formBean has a value, it will be
> automatically preselected in generated HTML.
>
> You can find more about html:options use in
> http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options
>
> Nico
>
> > > Hi
> > > Do something like this:
> > >
> > >
> > >
> > >
> > >  
> > > 
> > >   <%
> > > for(int i=0;i > >   %>
> > >  > > <%
> > > if (downloadday.equals(monthstosave[i])){
> > > %>selected<%}%>
> > > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > > <%}
> > >   %>
> > >   
> > >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread Nicolas De Loof

http://marc.theaimsgroup.com/?l=struts-user&m=102449257508421&w=2
http://marc.theaimsgroup.com/?l=struts-user&m=102449110907004&w=2

Nico

- Original Message -
From: "Rajesh Pradhan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 3:41 PM
Subject: RE: Multibox intial selection problem


> Hi,
> This is already answered by Nico.
> I faced the same problem some time ago.
> Why don't u go to the archives and search for it
> I am sure u will get it.
> Search for "how to set  initially the value of multibox to selected."
>
> Bye.
>
> Thanks & Regards,
> Rajesh Pradhan
>
>
>  -Original 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: 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 for the suggestion,u c i am not using html:select bos but its
> html:multibox
> pls if any info let me know
>
> thx
> gnan
>
> - Original Message -
> From: "Susmita Pati" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 6:12 PM
> Subject: RE: Multibox intial selection problem
>
>
> > Hi
> > Do something like this:
> >
> >
> >
> >
> >  
> > 
> >   <%
> > for(int i=0;i >   %>
> >  > <%
> > if (downloadday.equals(monthstosave[i])){
> > %>selected<%}%>
> > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > <%}
> >   %>
> >   
> >
> > -Original Message-
> > From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 27, 2002 12:50 AM
> > To: Struts Users Mailing List
> > Subject: Multibox intial selection problem
> >
> >
> > Hi
> >
> > i am new to struts ,can any one suggest how could a multibox be intially
> > selected based on a condition in jsp
> >
> > Thx in advance
> > GS
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread Nicolas De Loof

A cleaner (IMHO) way for generating such select in HTML would be :





... where "monthstosaveValues" is a collection of objects that have "value"
and "label" property (attribute+getters) for your select box items (that
could be placed in application scope if it is constant between users).

If "monthstosave" property of your formBean has a value, it will be
automatically preselected in generated HTML.

You can find more about html:options use in
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#options

Nico

> > Hi
> > Do something like this:
> >
> >
> >
> >
> >  
> > 
> >   <%
> > for(int i=0;i >   %>
> >  > <%
> > if (downloadday.equals(monthstosave[i])){
> > %>selected<%}%>
> > value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> > <%}
> >   %>
> >   
> >



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multibox intial selection problem

2002-06-24 Thread Rajesh Pradhan

Hi,
This is already answered by Nico.
I faced the same problem some time ago.
Why don't u go to the archives and search for it
I am sure u will get it.
Search for  "how to set  initially the value of multibox to selected."

Bye.

Thanks & Regards,
Rajesh Pradhan


 -Original 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: 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 for the suggestion,u c i am not using html:select bos but its
html:multibox
pls if any info let me know

thx
gnan

- Original Message -
From: "Susmita Pati" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 6:12 PM
Subject: RE: Multibox intial selection problem


> Hi
> Do something like this:
>
>
>
>
>  
> 
>   <%
> for(int i=0;i   %>
>  <%
> if (downloadday.equals(monthstosave[i])){
> %>selected<%}%>
> value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> <%}
>   %>
>   
>
> -Original Message-
> From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 27, 2002 12:50 AM
> To: Struts Users Mailing List
> Subject: Multibox intial selection problem
>
>
> Hi
>
> i am new to struts ,can any one suggest how could a multibox be intially
> selected based on a condition in jsp
>
> Thx in advance
> GS
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Multibox intial selection problem

2002-06-24 Thread Susmita Pati

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 for the suggestion,u c i am not using html:select bos but its
html:multibox
pls if any info let me know

thx
gnan

- Original Message -
From: "Susmita Pati" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 6:12 PM
Subject: RE: Multibox intial selection problem


> Hi
> Do something like this:
>
>
>
>
>  
> 
>   <%
> for(int i=0;i   %>
>  <%
> if (downloadday.equals(monthstosave[i])){
> %>selected<%}%>
> value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> <%}
>   %>
>   
>
> -Original Message-
> From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 27, 2002 12:50 AM
> To: Struts Users Mailing List
> Subject: Multibox intial selection problem
>
>
> Hi
>
> i am new to struts ,can any one suggest how could a multibox be intially
> selected based on a condition in jsp
>
> Thx in advance
> GS
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Multibox intial selection problem

2002-06-24 Thread gnanaseelan

Hi Susmita

   Thanks for the suggestion,u c i am not using html:select bos but its
html:multibox
pls if any info let me know

thx
gnan

- Original Message -
From: "Susmita Pati" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 6:12 PM
Subject: RE: Multibox intial selection problem


> Hi
> Do something like this:
>
>
>
>
>  
> 
>   <%
> for(int i=0;i   %>
>  <%
> if (downloadday.equals(monthstosave[i])){
> %>selected<%}%>
> value='<%=monthstosave[i]%>'><%=monthstosave[i]%>
> <%}
>   %>
>   
>
> -Original Message-
> From: gnanaseelan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 27, 2002 12:50 AM
> To: Struts Users Mailing List
> Subject: Multibox intial selection problem
>
>
> Hi
>
> i am new to struts ,can any one suggest how could a multibox be intially
> selected based on a condition in jsp
>
> Thx in advance
> GS
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Multibox intial selection problem

2002-06-24 Thread Susmita Pati

Hi
Do something like this:




 

  <%
  for(int i=0;i
 selected<%}%>
value='<%=monthstosave[i]%>'><%=monthstosave[i]%> 
<%} 
  %>
  

-Original Message-
From: gnanaseelan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 27, 2002 12:50 AM
To: Struts Users Mailing List
Subject: Multibox intial selection problem


Hi 

i am new to struts ,can any one suggest how could a multibox be intially
selected based on a condition in jsp

Thx in advance
GS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Multibox...

2002-01-15 Thread David M. Karr

> "Marcelo" == Marcelo Caldas <[EMAIL PROTECTED]> writes:

Marcelo> Hei,
Marcelo> Can somebody give me an example on how to use the  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> 
Marcelo>  my caption
Marcelo> 

Marcelo> and on my ActionFor I have...
Marcelo> public class...
Marcelo>private String[] daysOfWeek;
Marcelo>...

Marcelo>public void setDaysOfWeek(String[]) {...};
Marcelo>public String[] getDaysOfWeek() {...};

You misspelled the property name in the "html:multibox" tag.  It should be
"daysOfWeek", not "daysofWeek".  If it's really spelled correctly in the JSP,
and you just mistyped it in this note, then I don't know what the problem is.

-- 
===
David M. Karr  ; Best Consulting
[EMAIL PROTECTED]   ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multibox in iterate

2002-01-10 Thread Tricia Ong Cheah Yen

and how do u set the values for ? 

i had managed to create a list of  checkboxes but the "checked" status
isn't initialized at all, meaning, whatever checkboxes that were
selected by users were not reflected in the checkboxes when the user
returns to the same page again after successfully updating the database.


   ,



in UserForm, the getter & setter methods of accessList are as such:
public String[] getMgrAdminAccess() {
return this.mgrAdminAccess;
}

public void setMgrAdminAccess(String[] inMgrAdminAccess) {
this.mgrAdminAccess = inMgrAdminAccess;
}

+trish

-Original Message-
From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 6:00 PM
To: Struts Users Mailing List
Subject: RE: Multibox in iterate


You should add the "name='role'" attribute in the  tag.
When you think about it, it is logical.

hth,
tomK

> -Original Message-
> From: Viljoen, Danie [mailto:[EMAIL PROTECTED]] 
> Sent: woensdag 9 januari 2002 13:54
> To: 'Struts Users Mailing List'
> Subject: Multibox in iterate
> 
> 
> Hi
> 
> I iterate through a collection without any problem, but now I 
> want to add a
> checkbox for each row.  I used the following in my jsp page:
> 
> 
> 
> 
>  
>  
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> If I remove the multibox tag I iterate successfully, but with 
> the iterate
> tag I'm getting:
> 
> javax.servlet.ServletException: No getter method available 
> for property
> testChecked for bean under name org.apache.struts.taglib.html.BEAN
> 
> Thank You
> Danie
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Multibox in iterate

2002-01-10 Thread Tom Klaasen (TeleRelay)

You should add the "name='role'" attribute in the  tag.
When you think about it, it is logical.

hth,
tomK

> -Original Message-
> From: Viljoen, Danie [mailto:[EMAIL PROTECTED]] 
> Sent: woensdag 9 januari 2002 13:54
> To: 'Struts Users Mailing List'
> Subject: Multibox in iterate
> 
> 
> Hi
> 
> I iterate through a collection without any problem, but now I 
> want to add a
> checkbox for each row.  I used the following in my jsp page:
> 
> 
> 
> 
>  
>  
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> If I remove the multibox tag I iterate successfully, but with 
> the iterate
> tag I'm getting:
> 
> javax.servlet.ServletException: No getter method available 
> for property
> testChecked for bean under name org.apache.struts.taglib.html.BEAN
> 
> Thank You
> Danie
> 
> --
> To unsubscribe, e-mail:   
>  [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Multibox in iterate

2002-01-09 Thread Chen, Yong

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 iterate


Hi

I iterate through a collection without any problem, but now I want to add a
checkbox for each row.  I used the following in my jsp page:




 
 
 









If I remove the multibox tag I iterate successfully, but with the iterate
tag I'm getting:

javax.servlet.ServletException: No getter method available for property
testChecked for bean under name org.apache.struts.taglib.html.BEAN

Thank You
Danie

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multibox - i know is easy but i am lost!!!

2001-12-12 Thread simon

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




Then in my form handler
i need bean property that reflects this. e,g,

public final class MainMenuForm extends ActionForm {
public String[] blah;// for multi select

public String[] getBlah() {
return this.blah;
}
public void setBlah(String[] _blah) {
this.blah = _blah;
}
...etc
}

let me know if this isn't clear, otherwise
check out
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg16260.html
could help...?
Simon

Raul Enriquez wrote:

> Hi,
>
> i know this should be very easy, and i looked at the list and i found 
> questions like this. I copied the answer but i can not make it to work.
>
> when i use a multibox tag, inside a form and a iterate, i get always 
> the following error :
>
> No getter method available for property test for bean under name 
> org.apache.struts.taglib.html.BEAN
>
> the name of the bean in the form is fine!!! what do i have to write in 
> the set/get method?? thanks!!
>
>
> _
> Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp
>
>
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
>
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multibox and reset() "ERIK"

2001-10-02 Thread martin . cooper

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 and reset() "ERIK"


>
> I haven't tried the reset method, but I am setting the default
> values in the constructor.  I'm not sure how those two will help with my
> problem though.  Maybe let me try and explain it a little more.  I go to
the
> page for the first time and the formBean is created, everything is blank
and
> ok.  The user then selects 4 out of ten boxes and submits the form.  So
now
> I have a string array with 4 items in it.  The user returns to the page
and
> those four items are then selected out of the ten.  Then the user
unselects
> all items and submits the form.  The form has already been created so the
> constructor shouldn't fire and since there are no check boxes selected or
> submitted the setMethod won't get called and I will be left with the same
> array of four items.  Maybe I should have had them reset the form instead
of
> submitting a empty one here?  So this is where I added the code to my
action
> to see if no check boxes were submitted and then call the set method and
> pass in a string array of length 0.
>
>
> Jeff
>
>
> -Original Message-
> From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 02, 2001 11:46 AM
> To: [EMAIL PROTECTED]
> Subject: Re: multibox and reset() "ERIK"
>
>
> The better way is just what was mentioned set your values to null
> (false?) in the reset method.   But if you are using Struts 1.0 and not a
> more recent build, also setting them in the constructor or initial values
> when defined is a good idea to default them in the case you are navigating
> directly to the JSP page rather than going through a Struts action to get
to
> the JSP page.
>
> So more succintly, initialize values in reset and that should fix the
issue
> you described.   Did you try that?
>
> Erik
>
>
> - Original Message -
> From: "Krueger, Jeff" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> 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 method
myself
> > setting it to null.  Does anyone know of a better way to do 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 not submit a value if they are
unchecked,
> > therefore Struts has no way of knowing of their existence on the
original
> > HTML form and thus does not call any setters.  The reset method is where
> you
> > implement setting all your checkboxes (and likely other HTML field
types)
> to
> > their default (false, in your case) value.
> >
> > My patch was for the case where the ActionForm bean was created by a JSP
> > page rather than ActionServlet, and reset was not called at that point.
> In
> > your case, the ActionForm bean is being created (in the last request you
> > speak of) by ActionServlet, so reset should be called - this is all
> assuming
> > you are going through a Struts action for that request.
> >
> > My patch has been committed to Struts CVS, so its available in the
nightly
> > builds (I presume, unless those 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.  I have
> > > a page with many multibox tags on it.  When I select several of them
my
> > form
> > > bean is correctly populated with a string array.  If I come back to
the
> > page
> > > a

RE: multibox and reset() "ERIK"

2001-10-02 Thread Krueger, Jeff


I haven't tried the reset method, but I am setting the default
values in the constructor.  I'm not sure how those two will help with my
problem though.  Maybe let me try and explain it a little more.  I go to the
page for the first time and the formBean is created, everything is blank and
ok.  The user then selects 4 out of ten boxes and submits the form.  So now
I have a string array with 4 items in it.  The user returns to the page and
those four items are then selected out of the ten.  Then the user unselects
all items and submits the form.  The form has already been created so the
constructor shouldn't fire and since there are no check boxes selected or
submitted the setMethod won't get called and I will be left with the same
array of four items.  Maybe I should have had them reset the form instead of
submitting a empty one here?  So this is where I added the code to my action
to see if no check boxes were submitted and then call the set method and
pass in a string array of length 0.


Jeff


-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 11:46 AM
To: [EMAIL PROTECTED]
Subject: Re: multibox and reset() "ERIK"


The better way is just what was mentioned set your values to null
(false?) in the reset method.   But if you are using Struts 1.0 and not a
more recent build, also setting them in the constructor or initial values
when defined is a good idea to default them in the case you are navigating
directly to the JSP page rather than going through a Struts action to get to
the JSP page.

So more succintly, initialize values in reset and that should fix the issue
you described.   Did you try that?

Erik


- Original Message -
From: "Krueger, Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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 method myself
> setting it to null.  Does anyone know of a better way to do 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 not submit a value if they are unchecked,
> therefore Struts has no way of knowing of their existence on the original
> HTML form and thus does not call any setters.  The reset method is where
you
> implement setting all your checkboxes (and likely other HTML field types)
to
> their default (false, in your case) value.
>
> My patch was for the case where the ActionForm bean was created by a JSP
> page rather than ActionServlet, and reset was not called at that point.
In
> your case, the ActionForm bean is being created (in the last request you
> speak of) by ActionServlet, so reset should be called - this is all
assuming
> you are going through a Struts action for that request.
>
> My patch has been committed to Struts CVS, so its available in the nightly
> builds (I presume, unless those 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.  I have
> > a page with many multibox tags on it.  When I select several of them my
> form
> > bean is correctly populated with a string array.  If I come back to the
> page
> > all the correct boxes are checked.  If I remove all the checks and click
> > submit then my string array is left to what it was before.  I assume
this
> is
> > because there is no mutliboxes being submitted to the server, therefore
> the
> > setMethod is never getting called.  Is that what you patch fixed, if so
do
> > you know the status of that making it into a build?
> >
> > Thanks
> >
> > Jeff
> >
> >
> > -Original Message-
> > From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 14, 2001 8:24 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: multibox and reset()
> >
> >
> > reset is currently not called if  creates the form bean,
which
> > happens if you go to the JSP page directly without hitting

Re: multibox and reset() "ERIK"

2001-10-02 Thread Erik Hatcher

The better way is just what was mentioned set your values to null
(false?) in the reset method.   But if you are using Struts 1.0 and not a
more recent build, also setting them in the constructor or initial values
when defined is a good idea to default them in the case you are navigating
directly to the JSP page rather than going through a Struts action to get to
the JSP page.

So more succintly, initialize values in reset and that should fix the issue
you described.   Did you try that?

Erik


- Original Message -
From: "Krueger, Jeff" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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 method myself
> setting it to null.  Does anyone know of a better way to do 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 not submit a value if they are unchecked,
> therefore Struts has no way of knowing of their existence on the original
> HTML form and thus does not call any setters.  The reset method is where
you
> implement setting all your checkboxes (and likely other HTML field types)
to
> their default (false, in your case) value.
>
> My patch was for the case where the ActionForm bean was created by a JSP
> page rather than ActionServlet, and reset was not called at that point.
In
> your case, the ActionForm bean is being created (in the last request you
> speak of) by ActionServlet, so reset should be called - this is all
assuming
> you are going through a Struts action for that request.
>
> My patch has been committed to Struts CVS, so its available in the nightly
> builds (I presume, unless those 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.  I have
> > a page with many multibox tags on it.  When I select several of them my
> form
> > bean is correctly populated with a string array.  If I come back to the
> page
> > all the correct boxes are checked.  If I remove all the checks and click
> > submit then my string array is left to what it was before.  I assume
this
> is
> > because there is no mutliboxes being submitted to the server, therefore
> the
> > setMethod is never getting called.  Is that what you patch fixed, if so
do
> > you know the status of that making it into a build?
> >
> > Thanks
> >
> > Jeff
> >
> >
> > -Original Message-
> > From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 14, 2001 8:24 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: multibox and reset()
> >
> >
> > reset is currently not called if  creates the form bean,
which
> > happens if you go to the JSP page directly without hitting ActionServlet
> > first.
> >
> > I've submitted a patch to fix this, but it has not been committed yet.
> >
> > Erik
> >
> >
> > - Original Message -
> > From: "Renaud Waldura" <[EMAIL 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
> > > truly need to create a zero-length array like in your example below.
> > >
> > > I set mine to null, it seemed to work.
> > >
> > >
> > >
> > >
> > > - Original Message -
> > > From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, September 14, 2001 6:26 AM
> > > Subject: multibox and reset()
> > >
> > >
> &

RE: multibox and reset() "ERIK"

2001-10-02 Thread Krueger, Jeff

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 method myself
setting it to null.  Does anyone know of a better way to do 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 not submit a value if they are unchecked,
therefore Struts has no way of knowing of their existence on the original
HTML form and thus does not call any setters.  The reset method is where you
implement setting all your checkboxes (and likely other HTML field types) to
their default (false, in your case) value.

My patch was for the case where the ActionForm bean was created by a JSP
page rather than ActionServlet, and reset was not called at that point.   In
your case, the ActionForm bean is being created (in the last request you
speak of) by ActionServlet, so reset should be called - this is all assuming
you are going through a Struts action for that request.

My patch has been committed to Struts CVS, so its available in the nightly
builds (I presume, unless those 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.  I have
> a page with many multibox tags on it.  When I select several of them my
form
> bean is correctly populated with a string array.  If I come back to the
page
> all the correct boxes are checked.  If I remove all the checks and click
> submit then my string array is left to what it was before.  I assume this
is
> because there is no mutliboxes being submitted to the server, therefore
the
> setMethod is never getting called.  Is that what you patch fixed, if so do
> you know the status of that making it into a build?
>
> Thanks
>
> Jeff
>
>
> -Original Message-
> From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 14, 2001 8:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: multibox and reset()
>
>
> reset is currently not called if  creates the form bean, which
> happens if you go to the JSP page directly without hitting ActionServlet
> first.
>
> I've submitted a patch to fix this, but it has not been committed yet.
>
> Erik
>
>
> - Original Message -
> From: "Renaud Waldura" <[EMAIL 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
> > truly need to create a zero-length array like in your example below.
> >
> > I set mine to null, it seemed to work.
> >
> >
> >
> >
> > - Original Message -
> > From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 14, 2001 6:26 AM
> > Subject: multibox and reset()
> >
> >
> > > Hi!
> > >
> > >
> > > I am having trouble resetting a StringArray that is connected to a
> > -tag.
> > >
> > > HTML-Example:
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > >
> > > Corresponding ActionForm:
> > >
> > > public class MapForm extends ActionForm {
> > >
> > > private String[] _on = new String[0];
> > >
> > > public void reset() {
> > > _on = new String[0];
> > > }
> > >
> > > public void setLayer(String in) {
> > > _on = in;
> > > }
> > >
> > > public String[] getLayer() {
> > > return _on;
> > >
> > > }
> > > }
> > >
> > > The Manual told me to use the reset()-method to set The Array to the
> > length 0, but reset() is never called.
> > >
> > >
> > > Dirk
> > >
> > >
> >
> >
>



Re: multibox and reset() "ERIK"

2001-10-02 Thread Erik Hatcher

Jeff,

No, my patch did not fix this particular case.   Here is what is happening
in your scenario: checkboxes do not submit a value if they are unchecked,
therefore Struts has no way of knowing of their existence on the original
HTML form and thus does not call any setters.  The reset method is where you
implement setting all your checkboxes (and likely other HTML field types) to
their default (false, in your case) value.

My patch was for the case where the ActionForm bean was created by a JSP
page rather than ActionServlet, and reset was not called at that point.   In
your case, the ActionForm bean is being created (in the last request you
speak of) by ActionServlet, so reset should be called - this is all assuming
you are going through a Struts action for that request.

My patch has been committed to Struts CVS, so its available in the nightly
builds (I presume, unless those 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.  I have
> a page with many multibox tags on it.  When I select several of them my
form
> bean is correctly populated with a string array.  If I come back to the
page
> all the correct boxes are checked.  If I remove all the checks and click
> submit then my string array is left to what it was before.  I assume this
is
> because there is no mutliboxes being submitted to the server, therefore
the
> setMethod is never getting called.  Is that what you patch fixed, if so do
> you know the status of that making it into a build?
>
> Thanks
>
> Jeff
>
>
> -Original Message-
> From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 14, 2001 8:24 PM
> To: [EMAIL PROTECTED]
> Subject: Re: multibox and reset()
>
>
> reset is currently not called if  creates the form bean, which
> happens if you go to the JSP page directly without hitting ActionServlet
> first.
>
> I've submitted a patch to fix this, but it has not been committed yet.
>
> Erik
>
>
> - Original Message -
> From: "Renaud Waldura" <[EMAIL 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
> > truly need to create a zero-length array like in your example below.
> >
> > I set mine to null, it seemed to work.
> >
> >
> >
> >
> > - Original Message -
> > From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 14, 2001 6:26 AM
> > Subject: multibox and reset()
> >
> >
> > > Hi!
> > >
> > >
> > > I am having trouble resetting a StringArray that is connected to a
> > -tag.
> > >
> > > HTML-Example:
> > >
> > > 
> > > 
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > >
> > > Corresponding ActionForm:
> > >
> > > public class MapForm extends ActionForm {
> > >
> > > private String[] _on = new String[0];
> > >
> > > public void reset() {
> > > _on = new String[0];
> > > }
> > >
> > > public void setLayer(String in) {
> > > _on = in;
> > > }
> > >
> > > public String[] getLayer() {
> > > return _on;
> > >
> > > }
> > > }
> > >
> > > The Manual told me to use the reset()-method to set The Array to the
> > length 0, but reset() is never called.
> > >
> > >
> > > Dirk
> > >
> > >
> >
> >
>




RE: multibox and reset() "ERIK"

2001-10-02 Thread Krueger, Jeff

Erik,

I believe your patch will solve my problem but I'm not sure.  I have
a page with many multibox tags on it.  When I select several of them my form
bean is correctly populated with a string array.  If I come back to the page
all the correct boxes are checked.  If I remove all the checks and click
submit then my string array is left to what it was before.  I assume this is
because there is no mutliboxes being submitted to the server, therefore the
setMethod is never getting called.  Is that what you patch fixed, if so do
you know the status of that making it into a build?

Thanks

Jeff 


-Original Message-
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 14, 2001 8:24 PM
To: [EMAIL PROTECTED]
Subject: Re: multibox and reset()


reset is currently not called if  creates the form bean, which
happens if you go to the JSP page directly without hitting ActionServlet
first.

I've submitted a patch to fix this, but it has not been committed yet.

Erik


- Original Message -
From: "Renaud Waldura" <[EMAIL 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
> truly need to create a zero-length array like in your example below.
>
> I set mine to null, it seemed to work.
>
>
>
>
> - Original Message -
> From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 14, 2001 6:26 AM
> Subject: multibox and reset()
>
>
> > Hi!
> >
> >
> > I am having trouble resetting a StringArray that is connected to a
> -tag.
> >
> > HTML-Example:
> >
> > 
> > 
> > 
> >
> > 
> >
> > 
> >
> >
> > Corresponding ActionForm:
> >
> > public class MapForm extends ActionForm {
> >
> > private String[] _on = new String[0];
> >
> > public void reset() {
> > _on = new String[0];
> > }
> >
> > public void setLayer(String in) {
> > _on = in;
> > }
> >
> > public String[] getLayer() {
> > return _on;
> >
> > }
> > }
> >
> > The Manual told me to use the reset()-method to set The Array to the
> length 0, but reset() is never called.
> >
> >
> > Dirk
> >
> >
>
>



Antw: RE: multibox always checked

2001-09-26 Thread Marion Schwarz

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 jsp page uses the same parameter, but it can't fetch it out of the session 
scope.
It looks like this:

frameset
--
  

  
  


  



logon.jsp
-
<%
String senderParam = request.getParameter("sender");
pageContext.setAttribute("sender", senderParam, PageContext.SESSION_SCOPE);
%>


index.jsp
--
<%
String senderParam = pageContext.getAttribute("sender", PageContext.SESSION_SCOPE);
%>


Why doesn't this work ?

Stranger still: When I call index.jsp?sender=86 and fetch the parameter with 
request.getAttribute("sender") I still don't get it.
This worked earlier, but now everything's messed up.

Please help me.
Thank you all.




RE: multibox always checked

2001-09-25 Thread Hans Gilde

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 wait 3 or 4 seconds after a box is checked before refreshing the
price; every time a box is (un)checked, the timer is reset to prevent
multiple refreshes to the price frame.

Also, http://www.alienware.com/main/configurator_pages/custom.asp has a
pricing system that doesn't use frames.

-Original Message-
From: Marion Schwarz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 25, 2001 10:43 AM
To: [EMAIL PROTECTED]
Subject: multibox always checked


Hi folks,

after reading a million postings on the subject, I still have a question.

When a checkbox is selected, I want to count the selected object in a
different bean.
The total amount should be displayed immediatly in another frame so I have
to submit my form every time a checkbox is selected or deselected ( I would
be glad to hear of a better solution ).
My form revalidates correctly so that only checked multiboxes are truely
checked - with one exception:
The first of my checkboxes is always checked.

Does anybody have a clue to this phenomenon ?
Thanx in advance.

Marion






Re: multibox and reset()

2001-09-14 Thread Erik Hatcher

reset is currently not called if  creates the form bean, which
happens if you go to the JSP page directly without hitting ActionServlet
first.

I've submitted a patch to fix this, but it has not been committed yet.

Erik


- Original Message -
From: "Renaud Waldura" <[EMAIL 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
> truly need to create a zero-length array like in your example below.
>
> I set mine to null, it seemed to work.
>
>
>
>
> - Original Message -
> From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 14, 2001 6:26 AM
> Subject: multibox and reset()
>
>
> > Hi!
> >
> >
> > I am having trouble resetting a StringArray that is connected to a
> -tag.
> >
> > HTML-Example:
> >
> > 
> > 
> > 
> >
> > 
> >
> > 
> >
> >
> > Corresponding ActionForm:
> >
> > public class MapForm extends ActionForm {
> >
> > private String[] _on = new String[0];
> >
> > public void reset() {
> > _on = new String[0];
> > }
> >
> > public void setLayer(String in) {
> > _on = in;
> > }
> >
> > public String[] getLayer() {
> > return _on;
> >
> > }
> > }
> >
> > The Manual told me to use the reset()-method to set The Array to the
> length 0, but reset() is never called.
> >
> >
> > Dirk
> >
> >
>
>




Re: multibox and reset()

2001-09-14 Thread Renaud Waldura

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 Message -
From: "Dirk Jaeckel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 6:26 AM
Subject: multibox and reset()


> Hi!
>
>
> I am having trouble resetting a StringArray that is connected to a
-tag.
>
> HTML-Example:
>
> 
> 
> 
>
> 
>
> 
>
>
> Corresponding ActionForm:
>
> public class MapForm extends ActionForm {
>
> private String[] _on = new String[0];
>
> public void reset() {
> _on = new String[0];
> }
>
> public void setLayer(String in) {
> _on = in;
> }
>
> public String[] getLayer() {
> return _on;
>
> }
> }
>
> The Manual told me to use the reset()-method to set The Array to the
length 0, but reset() is never called.
>
>
> Dirk
>
>




RE: Multibox Question

2001-08-27 Thread SUHAS G. KULKARNI


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 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 11:22 AM
To: [EMAIL PROTECTED]
Subject: FW: Multibox Question


Still not clear why it works ? any one wants to clarify this !!
Suhas

-Original Message-
From: SUHAS G. KULKARNI [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 27, 2001 7:51 PM
To: [EMAIL PROTECTED]
Subject: Multibox Question


The below  code works - 
  
String 0
  

But if  I write   does not
work 
I get javax.servlet.ServletException: You must specify the value attribute
or nested tag content

I checked the struts-html.tld file for the syntax which shows "property" is
the only required attribute  . Then why is it asked for another attribute
called "value "

Let me know where I'm doing mistake ?

Thanks
Suhas




Re: Multibox confusion after reading Struts mail-archive

2001-06-22 Thread Becky Moyer

Steve!!! Thanks!!!
I just got it working!  I got my form working in the same fashion you had 
yours.  One of my problems had been with not importing the bean taglibs 
properly (as my face turns slightly red) and I had tried to put the empty 
values of one of the arrays in my form to be null when 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 confusion after reading Struts mail-archive
Date: Thu, 21 Jun 2001 15:05:38 -0600 (MDT)

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 arrays, but
 > when I try to iterate over my form as you have done in the example you 
gave,
 > I either had to iterate over one string array or the other, and when I 
tried
 > to specify the property in the multibox tag, it couldn't find the 
getter...I
 > am assuming that, in step with the example you gave, Struts is trying to 
do
 > a advancedQueryForm.getFindAssets().getSelectedAssets() for the multibox,
 > when I think you are saying it should be doing an
 > advancedQueryForm.getSelectedAssets().
 >I am still plodding along, but haven't made much progress.  Is there
 > something I'm missing?
 >Thanks,
 >Becky

  It sounds like you are getting close to what I'm using. I'm only
iterating over the String[] that contains all the possible values.
Values in the other String[] that match the array you are iterating
over will cause the checkboxes to be set to checked (but you don't need
to iterate over this second String[]). Also make sure the array you are
iterating over always contains all of the possible attributes, either by
saving it in session scope or repopulating it each time in request scope
(i.e., don't set it to null in reset()). In the ActionForm, I have:


 private String[] findAssets = null;
 private String[] selectedAssets = null;

/**
  * Get
  */
 public String[] getFindAssets() {
   return (this.findAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setFindAssets(String[] findAssets) {
   this.findAssets = findAssets;
 }


/**
  * Get
  */
 public String[] getSelectedAssets() {
   return (this.selectedAssets);
 }
/**
  * Set
  *
  * @param
  */
 public void setSelectedAssets(String[] selectedAssets) {
   this.selectedAssets = selectedAssets;
 }



_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Multibox confusion after reading Struts mail-archive

2001-06-21 Thread Steve A Drake

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 arrays, but
> when I try to iterate over my form as you have done in the example you gave,
> I either had to iterate over one string array or the other, and when I tried
> to specify the property in the multibox tag, it couldn't find the getter...I
> am assuming that, in step with the example you gave, Struts is trying to do
> a advancedQueryForm.getFindAssets().getSelectedAssets() for the multibox,
> when I think you are saying it should be doing an
> advancedQueryForm.getSelectedAssets().
>I am still plodding along, but haven't made much progress.  Is there
> something I'm missing?
>Thanks,
>Becky

 It sounds like you are getting close to what I'm using. I'm only
iterating over the String[] that contains all the possible values.
Values in the other String[] that match the array you are iterating
over will cause the checkboxes to be set to checked (but you don't need
to iterate over this second String[]). Also make sure the array you are
iterating over always contains all of the possible attributes, either by
saving it in session scope or repopulating it each time in request scope
(i.e., don't set it to null in reset()). In the ActionForm, I have:


private String[] findAssets = null;
private String[] selectedAssets = null;

/**
 * Get
 */
public String[] getFindAssets() {
  return (this.findAssets);
}
/**
 * Set
 *
 * @param
 */
public void setFindAssets(String[] findAssets) {
  this.findAssets = findAssets;
}


/**
 * Get
 */
public String[] getSelectedAssets() {
  return (this.selectedAssets);
}
/**
 * Set
 *
 * @param
 */
public void setSelectedAssets(String[] selectedAssets) {
  this.selectedAssets = selectedAssets;
}





Re: Multibox confusion after reading Struts mail-archive

2001-06-21 Thread Becky Moyer

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.  I made my form have 2 string arrays, but 
when I try to iterate over my form as you have done in the example you gave, 
I either had to iterate over one string array or the other, and when I tried 
to specify the property in the multibox tag, it couldn't find the getter...I 
am assuming that, in step with the example you gave, Struts is trying to do 
a advancedQueryForm.getFindAssets().getSelectedAssets() for the multibox, 
when I think you are saying it should be doing an 
advancedQueryForm.getSelectedAssets().
   I am still plodding along, but haven't made much progress.  Is there 
something I'm missing?
   Thanks,
   Becky


Original Message Follows
From: Steve A Drake <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: Re: Multibox confusion after reading Struts mail-archive
Date: Tue, 19 Jun 2001 15:41:52 -0600 (MDT)

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:
 >
 > 
 >
 > 
 >
 > Where entryData is an ArrayList of class EntryInfo, that has a
 > getSubscriptionStatus() which returns a boolean.  This displays properly,
 > and i see the appropriate boxes checked.
 >
 >
 > The associated Form bean has a boolean[] subscriptionStatus field with 
the
 > associated getter and setter methods.  When I try to evaluate the form in 
my
 > ActionClass, the result of form.getSubscriptionStatus() is null.
 >
 > I have also implemented the reset() method in my form where I iterate
 > through the subscriptionStatus array in the Form and set all values to 
null.
 >
 > My questions are...
 >
 > 1) I thought the "property" Attribute in the multibox tag refered to
 >the property in the form that would be submitted.  I may very well
 >be mistaken, but it seems from my experiments, the property
 >attrubute specifies which value will be displayed.  How does this
 >work?  If it represents which value will be displayed, how do you get
 >the information into your form?
 >
 > 2) As in the struts-exercise-taglib webapp, it appears that when you
 >use a multibox, you use an array of foo as the parameter that stores
 >the result in the form.  Is this right?  My confusion about this
 >seems to be one of my possible downfalls with getting information
 >into my form.
 >
 > Thanks so much for reading my rambles, and any thoughts or clarifications
 > would be excitedly welcomed.
 >
 >-Becky-
 > [EMAIL PROTECTED]

  Hello Becky. I flailed around with multibox myself before I found
something that worked. In the example below, I implemented two String[]
arrays in the ActionForm, "findAssets" and "selectedAssets". findAssets
maintains all of the possible values and selectedAssets maintains the
currently selected values. Iterate over all the possible values to print
the checkbox name and use the property setting of the selected values to
set the checkboxes.


  
   
  
  
  



Hope this helps.



_
Get your FREE download of MSN Explorer at http://explorer.msn.com




Re: Multibox confusion after reading Struts mail-archive

2001-06-19 Thread Steve A Drake

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:
>
> 
>
> 
>
> Where entryData is an ArrayList of class EntryInfo, that has a
> getSubscriptionStatus() which returns a boolean.  This displays properly,
> and i see the appropriate boxes checked.
>
>
> The associated Form bean has a boolean[] subscriptionStatus field with the
> associated getter and setter methods.  When I try to evaluate the form in my
> ActionClass, the result of form.getSubscriptionStatus() is null.
>
> I have also implemented the reset() method in my form where I iterate
> through the subscriptionStatus array in the Form and set all values to null.
>
> My questions are...
>
> 1) I thought the "property" Attribute in the multibox tag refered to
>the property in the form that would be submitted.  I may very well
>be mistaken, but it seems from my experiments, the property
>attrubute specifies which value will be displayed.  How does this
>work?  If it represents which value will be displayed, how do you get
>the information into your form?
>
> 2) As in the struts-exercise-taglib webapp, it appears that when you
>use a multibox, you use an array of foo as the parameter that stores
>the result in the form.  Is this right?  My confusion about this
>seems to be one of my possible downfalls with getting information
>into my form.
>
> Thanks so much for reading my rambles, and any thoughts or clarifications
> would be excitedly welcomed.
>
>-Becky-
> [EMAIL PROTECTED]

 Hello Becky. I flailed around with multibox myself before I found
something that worked. In the example below, I implemented two String[]
arrays in the ActionForm, "findAssets" and "selectedAssets". findAssets
maintains all of the possible values and selectedAssets maintains the
currently selected values. Iterate over all the possible values to print
the checkbox name and use the property setting of the selected values to
set the checkboxes.


 
  
 
 
 



Hope this helps.





Re: multibox

2001-02-11 Thread William Jaynes

The bug you mention concerns the multibox rendering. But my problem with the
multibox tag is as follows. The following line in the jsp work fine as is.
That is, it produces the expected html.



My problem occurs when the form is submitted. The "checkbox" array property
in my ActionForm is not populated with the values that have been checked.


- Original Message -
From: "Nick Chalko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 3:42 PM
Subject: RE: multibox


> 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 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: 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
> >
> >
> > 
> > ...
> >  > valuePropert="candidateId"/>
> > ...
> > 
> >
> > Now your form needs to have
> > public String[] getCheckbox() {...}
> > public void setCheckbox(String []) {...}
> >
> >
> > R,
> > Nick
> >
> > -Original Message-
> > From: William Jaynes [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 09, 2001 11:56 AM
> > To: struts user
> > Subject: multibox
> >
> >
> > I wonder if someone could give me an example of the multibox usage.
> > If I have something like this in my jsp:
> >
> > 
> > ...
> >  value="<%=candidate.getCandidateId()%>"/>
> > ...
> > 
> >
> > What do I need in the ActionFormBean for this jsp with respect to the
> > checkbox property?
> > Thanks for any info.
> >
> > Will




RE: multibox

2001-02-09 Thread Nick Chalko

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 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: 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
>
>
> 
> ...
>  valuePropert="candidateId"/>
> ...
> 
>
> Now your form needs to have
> public String[] getCheckbox() {...}
> public void setCheckbox(String []) {...}
>
>
> R,
> Nick
>
> -Original Message-
> From: William Jaynes [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 11:56 AM
> To: struts user
> Subject: multibox
>
>
> I wonder if someone could give me an example of the multibox usage.
> If I have something like this in my jsp:
>
> 
> ...
> 
> ...
> 
>
> What do I need in the ActionFormBean for this jsp with respect to the
> checkbox property?
> Thanks for any info.
>
> Will



Re: multibox

2001-02-09 Thread William Jaynes

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: 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
>
>
> 
> ...
>  valuePropert="candidateId"/>
> ...
> 
>
> Now your form needs to have
> public String[] getCheckbox() {...}
> public void setCheckbox(String []) {...}
>
>
> R,
> Nick
>
> -Original Message-
> From: William Jaynes [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 11:56 AM
> To: struts user
> Subject: multibox
>
>
> I wonder if someone could give me an example of the multibox usage.
> If I have something like this in my jsp:
>
> 
> ...
> 
> ...
> 
>
> What do I need in the ActionFormBean for this jsp with respect to the
> checkbox property?
> Thanks for any info.
>
> Will




RE: multibox

2001-02-09 Thread Nick Chalko

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 



...

...


Now your form needs to have 
public String[] getCheckbox() {...}
public void setCheckbox(String []) {...}


R,
Nick

-Original Message-
From: William Jaynes [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 11:56 AM
To: struts user
Subject: multibox


I wonder if someone could give me an example of the multibox usage.
If I have something like this in my jsp:


...

...


What do I need in the ActionFormBean for this jsp with respect to the
checkbox property?
Thanks for any info.

Will