struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bhaarat Sharma" <bhaara...@gmail.com>
Subject Re: <s:checkbox> preselect
Date Wed, 12 Dec 2007 21:36:08 GMT
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 <jdeffenbaugh@techtarget.com> 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 <jogep@web.de> 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: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> > --
> > -bhaarat
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

--
-bhaarat

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message