What about using s:checkboxlist with a single-item list?

-Jake


-----Original Message-----
From: bhaarat Sharma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 12, 2007 4:36 PM
To: Struts Users Mailing List
Subject: Re: <s:checkbox> preselect

tried it and doesnt work :(

this is a real drawback that struts2 allows only true or false to come
from checkboxes

On 12/12/07, Jason Deffenbaugh <[EMAIL PROTECTED]> wrote:
Try this:
>
> <s:checkbox label=\\\"checkbox test\\\" name=\\\"checkboxField1\\\"
> fieldValue=\\\"something\\\" value=\"checkboxField1\"/>
>
> I\'m not sure that will work.
>
> -J
>
> On Wed, 2007-12-12 at 16:15 -0500, bhaarat Sharma wrote:
> > but in my action class i am doing a lot of stuff based on the
> > \\\'value\\\' of the checkbox.
> >
> > is there no way to do this other than making fieldValue a boolean
value!?!
> >
> > If I do that I will have to change a lot of stuff in my action
class.
> > Also, this isnt mentioned in the documentation for checkbox.  :(
> >
> > On 12/12/07, Johannes Geppert <[EMAIL PROTECTED]> wrote:
> > try to use boolean and not String for checkboxes.
> > >
> > > Bye
> > > jogep
> > >
> > > > my getters and setters:
> > > >     public String getCheckboxField1() {
> > > >         return checkboxField1;
> > > >     }
> > > >
> > > >     public void setCheckboxField1(String checkboxField1) {
> > > >         this.checkboxField1 = checkboxField1;
> > > >     }
> > > >
> > >
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > -bhaarat
> >
> >
---------------------------------------------------------------------
> > 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]
>
>

--
-bhaarat

---------------------------------------------------------------------
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]

Reply via email to