-----Original Message----- From: Jean-Philippe Couture [mailto:[EMAIL PROTECTED] Sent: Friday, November 05, 2004 2:25 PM To: Robert Taylor Subject: Re: Struts html:checkbox
Hi Robert, Thanks a bunch for the helpful tip. I used a ((DynaActionForm)form).set("propName",String.valueOf(boolValue)); in the Action class right before loading the JSP. It works exactly as expected now. Thanks again! Best regards, Jean-Philippe Couture On Fri, 5 Nov 2004 12:11:12 -0500, Robert Taylor <[EMAIL PROTECTED]> wrote: > Set the corresponding form property to true prior to loading the page. > If the actual form property value equals the ${boolValue}, then the > checkbox should render as checked. That is, it should produce the > appropriate HTML which should render the checkbox as checked. > > robert > > > > > -----Original Message----- > > From: Jean-Philippe Couture [mailto:[EMAIL PROTECTED] > > Sent: Friday, November 05, 2004 11:56 AM > > To: [EMAIL PROTECTED] > > Subject: Struts html:checkbox > > > > > > Hi, > > > > Sorry if this problem has already been solved, I cannot seem to find > > anything in the Struts List Archive... > > > > I have an Action class that sets, in the ActionForward method of the > > said Action class, an attribute of an object in the request scope to > > push it to the presentation layer (JSP). In the JSP form, I use > > exclusively Custom Struts Tag to display data from the object in the > > request scope. > > > > Everything works greatly except for that > > <html:checkbox property="propName" > > value="${boolValue}"></html:checkbox> which doesn't seem to render the > > "checked="checked" attribute. The value of the "value" attribute is > > set to true... but for some reason, I can't seem to get it render > > checked on load. > > > > Is there a way to get a <html:checkbox> render as checked upon JSP load? > > > > > > Best regards, > > > > --------------------------------------------------------------------- > > 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]