Right, so by default the boolean will equal "false"... So when it sets the "fieldvalue=test" it evaluates isTest() and gets false, so false becomes what you will pass if it is checked. Change this to "fieldValue=true" and it should do what you want, I think.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Saturday, January 10, 2004 3:41 PM > To: [EMAIL PROTECTED] > Subject: Spam:[OS-webwork] RE: Checkbox > > > I have the get/set in my action, and when I check the > checkbox and submit my form, the following URL is generated: > http://localhost:8080/WebWork2/checkTest.action?test=false > , the URL should be: /checkTest.action?test=true > > if I donīt check the checkbox and submit, the URL is: > http://localhost:8080/WebWork2/checkTest.action? > > #tag(Checkbox "label='checkbox test'" "name='test'" > "fieldValue=test" ) > > public class CheckAction implements Action > { > private boolean test; > > public String execute() throws Exception > { > return SUCCESS; > } > > public boolean isTest() > { > System.out.println("get -> " + test); > return test; > } > > public void setTest(boolean b) > { > test = b; // alwasys set to false! > System.out.println("set -> " + test); > } > } > > thanks > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 09, 2004 8:03 PM > Subject: Opensymphony-webwork digest, Vol 1 #1420 - 7 msgs > > > > Send Opensymphony-webwork mailing list submissions to > > [EMAIL PROTECTED] > > > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > or, via email, send a message with subject or body 'help' to > > [EMAIL PROTECTED] > > > > You can reach the person managing the list at > > [EMAIL PROTECTED] > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Opensymphony-webwork digest..." > > > > > > Today's Topics: > > > > 1. RE: Checkbox (Jason Carreira) > > 2. Re: Any sugesstions fro image manipulation (Anthony Eden) > > 3. reuse Beans in ActionSupport classes and jsp > (=?iso-8859-1?Q?Jan-Peter=20Hagenm=FCller?=) > > 4. Re: Any sugesstions fro image manipulation (remigijus) > > 5. RE: reuse Beans in ActionSupport classes and jsp > (Jason Carreira) > > 6. CheckBox tag ([EMAIL PROTECTED]) > > 7. Re: CheckBox tag (Scott Farquhar) > > > > --__--__-- > > > > Message: 1 > > Subject: RE: [OS-webwork] Checkbox > > Date: Fri, 9 Jan 2004 08:21:41 -0600 > > From: "Jason Carreira" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Reply-To: [EMAIL PROTECTED] > > > > This is a multi-part message in MIME format. > > > > ------_=_NextPart_001_01C3D6BB.E6D76CC6 > > Content-Type: text/plain; > > charset="us-ascii" > > Content-Transfer-Encoding: quoted-printable > > > > When you say it isn't working, what do you mean? It's not > being set? > > =20 Do you have a getter and setter for your check property? > > =20 > > void setCheck(boolean check) > > boolean isCheck() > > > > -----Original Message----- > > From: ricardolecheta [mailto:[EMAIL PROTECTED] > > Sent: Friday, January 09, 2004 7:58 AM > > To: opensymphony-webwork > > Subject: [OS-webwork] Checkbox > > =09 > > =09 > > Hi, I'm a WebWork beginnner, > > =20 > > I have the following Action, > > public class TagTestAction implements Action=20 > > {=20 > > boolean check;=20 > > ...=20 > > } > > =20 > > and... > > =20 > > #tag(Checkbox "label=3D'checkbox test'" "name=3D'check'" > > "fieldValue=3Dcheck" "size=3D50") =20 > > if the check property is true, the ckeckbox in my view will be > > checked...=20 > > and when I check it in the html page and submit my form, the > > attribute in my action will be true.... > > =20 > > but this isn't working... > > =20 > > can anyone help me? > > =20 > > thanks > > > > > > ------_=_NextPart_001_01C3D6BB.E6D76CC6 > > Content-Type: text/html; > > charset="us-ascii" > > Content-Transfer-Encoding: quoted-printable > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <HTML><HEAD><TITLE>Message</TITLE> > > <META http-equiv=3DContent-Type content=3D"text/html; = > > charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2800.1276" > > name=3DGENERATOR></HEAD> <BODY> > > <DIV><SPAN class=3D391132014-09012004><FONT face=3DArial > color=3D#0000ff = > > size=3D2>When=20 > > you say it isn't working, what do you mean? It's not being=20 > > set?</FONT></SPAN></DIV> > > <DIV><SPAN class=3D391132014-09012004><FONT face=3DArial > color=3D#0000ff = > > > > size=3D2></FONT></SPAN> </DIV> > > <DIV><SPAN class=3D391132014-09012004><FONT face=3DArial > > color=3D#0000ff = size=3D2>Do you=20 have a getter and > setter for your > > check property?</FONT></SPAN></DIV> <DIV><SPAN > > class=3D391132014-09012004><FONT face=3DArial color=3D#0000ff = > > > > size=3D2></FONT></SPAN> </DIV> > > <DIV><SPAN class=3D391132014-09012004><FONT face=3DArial > > color=3D#0000ff = size=3D2>void=20 setCheck(boolean > > check)</FONT></SPAN></DIV> <DIV><SPAN > class=3D391132014-09012004><FONT > > face=3DArial color=3D#0000ff = > > > > size=3D2>boolean isCheck()</FONT></SPAN></DIV> > > <BLOCKQUOTE dir=3Dltr=20 > > style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: > #0000ff 2px > > = solid; MARGIN-RIGHT: 0px"> > > <DIV></DIV> > > <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr = > > align=3Dleft><FONT=20 > > face=3DTahoma size=3D2>-----Original > Message-----<BR><B>From:</B> = > > ricardolecheta=20 > > [mailto:[EMAIL PROTECTED] <BR><B>Sent:</B> Friday, > > January = 09, 2004=20 > > 7:58 AM<BR><B>To:</B> opensymphony-webwork<BR><B>Subject:</B> = > > [OS-webwork]=20 > > Checkbox<BR><BR></FONT></DIV> > > <DIV>Hi, I'm a WebWork beginnner,</DIV> > > <DIV> </DIV> > > <DIV>I have the following Action,</DIV> > > <DIV>public class TagTestAction implements Action <BR>{ > <BR>boolean > > = check;=20 > > <BR>... <BR>}</DIV> > > <DIV> </DIV> > > <DIV>and...</DIV> > > <DIV> </DIV> > > <DIV>#tag(Checkbox "label=3D'checkbox test'" "name=3D'check'" = > > "fieldValue=3Dcheck"=20 > > "size=3D50")</DIV> > > <DIV> </DIV> > > <DIV>if the check property is true, the ckeckbox in my > view will be > > = checked...=20 > > </DIV> > > <DIV>and when I check it in the html page and submit my > form, the = > > attribute in=20 > > my action will be true....</DIV> > > <DIV> </DIV> > > <DIV>but this isn't working...</DIV> > > <DIV> </DIV> > > <DIV>can anyone help me?</DIV> > > <DIV> </DIV> > > <DIV>thanks</DIV></BLOCKQUOTE></BODY></HTML> > > =00 > > ------_=_NextPart_001_01C3D6BB.E6D76CC6-- > > > > > > --__--__-- > > > > Message: 2 > > Date: Fri, 09 Jan 2004 10:03:55 -0500 > > From: Anthony Eden <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: Re: [OS-webwork] Any sugesstions fro image manipulation > > Reply-To: [EMAIL PROTECTED] > > > > I've just posted an entry on my weblog ( > > http://weblog.anthonyeden.com/archives/000055.html ) which > provides an > > example of using Jimi for resizing an image, if you are interested. > > > > -Anthony > > > > Fernando Martins wrote: > > > > >try Jimi > > >http://java.sun.com/products/jimi/ > > > > > > > > >On Friday 09 January 2004 08:36, remigijus wrote: > > > > > > > > >>This question is not about ww, but I hope some suggestions will be > given. > > >> > > >>I need some library for image processing on the server > side. I want > > >>to > make > > >>thumbnail image file from an image file uploaded by user. > > >> > > >>Thanks > > >> > > >>Remis > > >> > > >> > > > > > > > > > > > >------------------------------------------------------- > > >This SF.net email is sponsored by: Perforce Software. > Perforce is the > > >Fast Software Configuration Management System offering advanced > > >branching capabilities and atomic changes on 50+ platforms. Free > > >Eval! http://www.perforce.com/perforce/loadprog.html > > >_______________________________________________ > > >Opensymphony-webwork mailing list > > >[EMAIL PROTECTED] > > >https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > > > > > > --__--__-- > > > > Message: 3 > > From: =?iso-8859-1?Q?Jan-Peter=20Hagenm=FCller?= > > <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Date: Fri, 09 Jan 2004 17:06:01 +0100 > > Subject: [OS-webwork] reuse Beans in ActionSupport classes and jsp > > Reply-To: [EMAIL PROTECTED] > > > > > > hi > > > > i want to reuse some beans in my ActionSupport classes like: > > > > class MyActionSupport extends ActionSupport { > > MyBean Bean = new MyBean(); > > public getMyBean() {retun MyBean();} +setter > > public String execute() { ... } > > } > > > > and i want to reuse the ui component e.g. as in a jsp for > > MyActionSupport > like > > ... > > <input type="text" name="bean.prop1" value="<ww: property > value="bean.prop1"/>" > > > > if a have a reference called Bean2 in another ActionSupport class i > > cannot (re)use the ui component because i rely on "bean.prop" and > > not > on "bean2.prop" > > > > if i take prop1 without bean(2).prop1 it won't work i think. > > > > are there any typically practices where i need only one generally ui > component ? > > > > thanks! > > > > jp > > > > > > > > > > > > > > --__--__-- > > > > Message: 4 > > From: "remigijus" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Subject: Re: [OS-webwork] Any sugesstions fro image manipulation > > Date: Fri, 9 Jan 2004 18:46:32 +0200 > > Reply-To: [EMAIL PROTECTED] > > > > Best service I have ever seen. Thanks Anthony for such answer. > > > > ----- Original Message ----- > > From: "Anthony Eden" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, January 09, 2004 5:03 PM > > Subject: Re: [OS-webwork] Any sugesstions fro image manipulation > > > > > > > I've just posted an entry on my weblog ( > > > http://weblog.anthonyeden.com/archives/000055.html ) > which provides > > > an example of using Jimi for resizing an image, if you are > > > interested. > > > > > > -Anthony > > > > > > Fernando Martins wrote: > > > > > > >try Jimi > > > >http://java.sun.com/products/jimi/ > > > > > > > > > > > >On Friday 09 January 2004 08:36, remigijus wrote: > > > > > > > > > > > >>This question is not about ww, but I hope some > suggestions will be > > given. > > > >> > > > >>I need some library for image processing on the server side. I > > > >>want to > > make > > > >>thumbnail image file from an image file uploaded by user. > > > >> > > > >>Thanks > > > >> > > > >>Remis > > > >> > > > >> > > > > > > > > > > > > > > > >------------------------------------------------------- > > > >This SF.net email is sponsored by: Perforce Software. > Perforce is > > > >the Fast Software Configuration Management System > offering advanced > > > >branching capabilities and atomic changes on 50+ platforms. Free > > > >Eval! http://www.perforce.com/perforce/loadprog.html > > > >_______________________________________________ > > > >Opensymphony-webwork mailing list > > > >[EMAIL PROTECTED] > > > >https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Perforce Software. Perforce is > > > the Fast Software Configuration Management System > offering advanced > > > branching capabilities and atomic changes on 50+ platforms. Free > > > Eval! http://www.perforce.com/perforce/loadprog.html > > > _______________________________________________ > > > Opensymphony-webwork mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > > > --__--__-- > > > > Message: 5 > > Subject: RE: [OS-webwork] reuse Beans in ActionSupport > classes and jsp > > Date: Fri, 9 Jan 2004 10:57:44 -0600 > > From: "Jason Carreira" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Reply-To: [EMAIL PROTECTED] > > > > So you want to reuse some JSP piece? > > > > You can do this: > > > > <ww:push value=3D"bean"> > > <ww:include page=3D"bean.jsp"/> > > </ww:push> > > > > Then your bean.jsp can just access the properties directly, > like this: > > > > <ww:property value=3D"prop1"/> > > > > And, because the bean is pushed onto the value stack, it > will find the > > = properties there.... > > > > In your second page, you just push on "bean2" instead. > > > > Jason > > > > > -----Original Message----- > > > From: Jan-Peter Hagenm=FCller [mailto:[EMAIL PROTECTED] > > > Sent: Friday, January 09, 2004 11:06 AM > > > To: [EMAIL PROTECTED] > > > Subject: [OS-webwork] reuse Beans in ActionSupport > classes and jsp > > >=20 =20 > > >=20 > > > hi > > >=20 > > > i want to reuse some beans in my ActionSupport classes like: > > >=20 > > > class MyActionSupport extends ActionSupport { > > > MyBean Bean =3D new MyBean(); > > > public getMyBean() {retun MyBean();} +setter > > > public String execute() { ... } > > > } > > >=20 > > > and i want to reuse the ui component e.g. as in a jsp for=20 > > > MyActionSupport like ... <input type=3D"text" > name=3D"bean.prop1"=20 > > > value=3D"<ww: property value=3D"bean.prop1"/>" > > >=20 > > > if a have a reference called Bean2 in another ActionSupport=20 > > > class i cannot (re)use the ui component because i rely on =20 > > > "bean.prop" and not on "bean2.prop" > > >=20 > > > if i take prop1 without bean(2).prop1 it won't work i think. > > >=20 > > > are there any typically practices where i need only one=20 > > > generally ui component ? > > >=20 > > > thanks! > > >=20 > > > jp > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Perforce Software. > > > Perforce is the Fast Software Configuration Management System=20 > > > offering advanced branching capabilities and atomic changes=20 > > > on 50+ platforms. Free Eval!=20 > > > http://www.perforce.com/perforce/loadprog.html > > >=20 > > > _______________________________________________ > > > Opensymphony-webwork mailing list=20 > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > >=20 > > > > > > --__--__-- > > > > Message: 6 > > From: <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Date: Fri, 9 Jan 2004 21:37:46 -0800 > > Subject: [OS-webwork] CheckBox tag > > Reply-To: [EMAIL PROTECTED] > > > > This is a multi-part message in MIME format. > > > > ------=_NextPart_000_0065_01C3D6F8.D2887EA0 > > Content-Type: text/plain; > > charset="iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > > > > Hi, I'm a WebWork beginnner and I'm trying to migrate from > Struts to = > > WebWork2, > > > > I have the following Action, > > > > public class TagTestAction implements Action > > { > > boolean test; > > } > > > > and... > > #tag(Checkbox "label=3Dcheckbox test'" "name=3D'test'" = > > "fieldValue=3Dtest" "size=3D30") > > > > if the property test is true, the ckeckbox in my view will > be checked = > > ...=20 > > and when I check it in the html page and submit my form, > the attribute=20 > > in my action will be true.... does it work like this, or > I=B4m wrong? > > > > but this isn't working, the property test in the action is > always set to = > > false after de submit... > > > > can anyone help me ? > > > > thanks > > > > ------=_NextPart_000_0065_01C3D6F8.D2887EA0 > > Content-Type: text/html; > > charset="iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <HTML><HEAD> > > <META http-equiv=3DContent-Type content=3D"text/html; = > > charset=3Diso-8859-1"> > > <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> > > <STYLE></STYLE> > > </HEAD> > > <BODY bgColor=3D#ffffff> > > <DIV><FONT face=3DArial size=3D2>Hi, I'm a WebWork > beginnner and I'm = > > trying to=20 > > migrate from Struts to WebWork2,</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3DArial size=3D2>I have the following = > > Action,</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3DArial size=3D2>public class TagTestAction > implements=20 > > Action<BR>{<BR> boolean test;<BR>}</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3DArial size=3D2>and...<BR>#tag(Checkbox = > > "label=3Dcheckbox test'"=20 > > "name=3D'test'" "fieldValue=3Dtest" "size=3D30")</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3DArial size=3D2>if the property test is true, the = > > ckeckbox in my=20 > > view will be checked ... <BR>and when I check it in the > html page and = > > submit my=20 > > form, the attribute <BR>in my action will be true.... does > it work like = > > this, or=20 > > I=B4m wrong?</FONT></DIV> > > <DIV><FONT face=3DArial size=3D2></FONT> </DIV> > > <DIV><FONT face=3DArial size=3D2>but this isn't working, > the property = > > test in the=20 > > action is always set to false after de submit...</FONT></DIV> > > <DIV><FONT face=3DArial size=3D2></FONT> </DIV> > > <DIV><FONT face=3DArial size=3D2>can anyone help me ?</FONT></DIV> > > <DIV> </DIV> > > <DIV><FONT face=3DArial size=3D2>thanks</FONT></DIV></BODY></HTML> > > > > ------=_NextPart_000_0065_01C3D6F8.D2887EA0-- > > > > > > > > --__--__-- > > > > Message: 7 > > Date: Fri, 9 Jan 2004 19:49:59 -0600 > > From: Scott Farquhar <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > Subject: Re: [OS-webwork] CheckBox tag > > Reply-To: [EMAIL PROTECTED] > > > > On Fri, Jan 09, 2004 at 09:37:46PM -0800, > [EMAIL PROTECTED] wro= > > te: > > > I have the following Action, > > >=20 > > > public class TagTestAction implements Action > > > { > > > boolean test; > > > } > > >=20 > > > and... > > > #tag(Checkbox "label=3Dcheckbox test'" "name=3D'test'" > "fieldValue=3Dte= > > st" "size=3D30") > > >=20 > > > if the property test is true, the ckeckbox in my view > will be checked .= > > ..=20 > > > and when I check it in the html page and submit my form, the > attribute=20 > > > in my action will be true.... does it work like this, or > I=B4m wrong? > > >=20 > > > but this isn't working, the property test in the action > is always set t= > > o false after de submit... > > > > You need setters & getters on your action > > > > public boolean getTest(); > > > > public void setTest(boolean test); > > > > Else how does webwork set the values on 'test'? > > > > > > > > > > --__--__-- > > > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > End of Opensymphony-webwork Digest > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork