You would just need to override the checkbox.ftl template. Below is a line from the Struts template/simple/checkbox.ftl file. You'll notice the line below defaults to false if "submitUnchecked" is not present.

<#if parameters.submitUnchecked!false>

Change to:
<#if parameters.submitUnchecked!true>

To override a template file, you just need to copy it to your code base in the same folder (depending on which template you are using: simple, xhtml, css_html, etc)) More info can be found here: https://struts.staged.apache.org/getting-started/themes

Thanks,
Burton

------ Original Message ------
From "Britta Katzenbach" <katzenb...@liwa.de>
To user@struts.apache.org
Date 11/9/2022 2:40:19 AM
Subject Checkbox tag new attribute submitUnchecked

Hi,

We are migrating from struts 2.5 to 6.0.3. You have implemented the new tag attribute submitUnchecked in the checkbox. The default value is false. Is there any way to set the attribute default value to true?

Best regards,

Britta

Britta Katzenbach

_____________________________________________________
e-Mail: katzenb...@liwa.de

Dr. Lippke & Dr. Wagner GmbH
Nassauische Str. 25
10717 Berlin
Tel./Fax: +49 30 2147309-0 / 2

Geschäftsführer: Florian Schlittgen
Registergericht: Amtsgericht Berlin HRB 25607

Reply via email to