You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Firmin David <da...@capco.com> on 2001/02/16 15:40:07 UTC

...again.

"William Jaynes" wrote:


>The following line in the jsp work fine as is.
>That is, it produces the expected html.
>
><html:multibox property="checkbox"
>  value="<%=candidate.getCandidateId()%>"/>
>
>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.


I have this problem too. I get NullPointers a-plenty when I try and validate
the values from the checked boxes in my bean's String[].

Anyone any ideas they might like to share as to why these fields aren't
getting populated when the form is submitted? I'm clueless..!

Thanks in advance...

Rgds

David

************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of
The Capital Markets Company.

http://www.capco.com
***********************************************************************


Re: ...again.

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
David, could you try the Struts test application (in struts-test.war)?  It has a
page that exercises the <html:multibox> tag, and might give you some clues about
what you are doing differently.

Craig


Firmin David wrote:

> "William Jaynes" wrote:
>
> >The following line in the jsp work fine as is.
> >That is, it produces the expected html.
> >
> ><html:multibox property="checkbox"
> >  value="<%=candidate.getCandidateId()%>"/>
> >
> >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.
>
> I have this problem too. I get NullPointers a-plenty when I try and validate
> the values from the checked boxes in my bean's String[].
>
> Anyone any ideas they might like to share as to why these fields aren't
> getting populated when the form is submitted? I'm clueless..!
>
> Thanks in advance...
>
> Rgds
>
> David
>
> ************************************************************************
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorised. If you are not
> an intended recipient, you must not read, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of
> The Capital Markets Company.
>
> http://www.capco.com
> ***********************************************************************


Re: ...again.

Posted by William Jaynes <wj...@mediaone.net>.
I finally got the multibox to work as the documentation lead me to expect, although it seems that
this may be a bug of some sort. The multibox never worked as I expected as long as I included the
name and type attributes in the form tag. When I removed the name and type attributes (thus letting
struts look them up from the struts-conf.xml file) then the multibox tag worked as expected.

----- Original Message -----
From: "Firmin David" <da...@capco.com>
To: <st...@jakarta.apache.org>
Sent: Friday, February 16, 2001 9:40 AM
Subject: <html:multibox> ...again.


> "William Jaynes" wrote:
>
>
> >The following line in the jsp work fine as is.
> >That is, it produces the expected html.
> >
> ><html:multibox property="checkbox"
> >  value="<%=candidate.getCandidateId()%>"/>
> >
> >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.
>
>
> I have this problem too. I get NullPointers a-plenty when I try and validate
> the values from the checked boxes in my bean's String[].
>
> Anyone any ideas they might like to share as to why these fields aren't
> getting populated when the form is submitted? I'm clueless..!
>
> Thanks in advance...
>
> Rgds
>
> David
>
> ************************************************************************
> The information in this email is confidential and is intended solely
> for the addressee(s).
> Access to this email by anyone else is unauthorised. If you are not
> an intended recipient, you must not read, use or disseminate the
> information contained in the email.
> Any views expressed in this message are those of the individual sender,
> except where the sender specifically states them to be the views of
> The Capital Markets Company.
>
> http://www.capco.com
> ***********************************************************************
>


html:select again!

Posted by Dennis <de...@iswsolutions.com>.
I thought I saw a similar request not too long ago, but can't seem to find
it nor any responses to it - are there any examples of the html:select tag
beyond the very basic one used in the struts example?  I don't have any
javascript background, so I'm having trouble using the onchange attribute to
return me to the current page (so I can change the value of another
html:select based on the current value of the first).

Thanks,

Dennis