Browsers sumbit checboxes without a value as "linux=on". So you need to
specify value="true". Then you get "linux=true".

Mathias

-----Original Message-----
From: Jason Carreira [mailto:[EMAIL PROTECTED] 
Sent: maandag 16 juni 2003 20:50
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] boolean setter methods


I think it's the value you have in there that's the problem... Try the
value="true"... Also, since you won't get any param sent if the checkbox is
not checked (one of the fun things about HTTP) you should make that field
default to false.

> -----Original Message-----
> From: G.L. Grobe [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 11, 2003 11:54 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] boolean setter methods
> 
> 
> 
> I've got a setter being called from a velocity template but I can't
> figure out how to make it set a boolean value. In the *.vm I have the 
> following ...
> 
> <input type="checkbox" name="linux" value="Linux"> Linux
> 
> And in my webworks ActionSupport class I've got a setter ...
> 
>     public void setLinux(boolean os) {
>        this.linux = os;
>     }
> 
> It gets called, but I can't make it set the value as checked, true or
> false.
> 
> Any help much appreciated.
> 
> 
> 
> -------------------------------------------------------
> This SF.NET email is sponsored by: eBay
> Great deals on office technology -- on eBay now! Click here:
> http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5
> 
> _______________________________________________
> 
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to