You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Burton Rhodes <bu...@gmail.com> on 2022/11/09 13:21:10 UTC

Re: From ??? Re: Checkbox tag new attribute submitUnchecked

Sure thing. When this feature was implemented, I remember making sure we 
didn't break backward compatibility.  Strange that you are seeing this 
"break" during your upgrade.  Perhaps Lukasz can chime in.

Pull Request for SubmitUnchecked
https://github.com/apache/struts/pull/169


------ Original Message ------
From "Britta Katzenbach" <ka...@liwa.de>
To "Struts Users Mailing List" <us...@struts.apache.org>
Date 11/9/2022 7:10:54 AM
Subject Re: From ??? Re: Checkbox tag new attribute submitUnchecked

>Hi Burton,
>
>Thanks for the quick answer and the description! I was hoping for a 
>solution to set the default value via the configuration, but it is ok. 
>We prefer to set the attribute in all our checkboxes in this case, 
>because otherwise we would need to maintain the template.
>
>It would be nice if there is a short remark in the migration guide, 
>that the attribute is added and its default value. Otherwise it is kind 
>of hard to notice that the application is behaving differently.
>
>Kind regards,
>
>Britta
>
>Britta Katzenbach
>
>_____________________________________________________
>e-Mail: katzenbach@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
>
>
>>Am 09.11.2022 um 12:25 schrieb Burton Rhodes <bu...@gmail.com>:
>>
>>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" <ka...@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: katzenbach@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
>>>
>

Re: From ??? Re: From ??? Re: Checkbox tag new attribute submitUnchecked

Posted by Britta Katzenbach <ka...@liwa.de>.
Thanks! I entered the ticket:

https://issues.apache.org/jira/browse/WW-5260

As I described in the ticket, the best solution would be to stick with default value false, but offer a solution to change it via configuration. 

Kind regards,

Britta Katzenbach

_____________________________________________________
e-Mail: katzenbach@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


> Am 09.11.2022 um 15:59 schrieb Lukasz Lenart <lu...@apache.org>:
> 
> śr., 9 lis 2022 o 14:59 Britta Katzenbach <ka...@liwa.de> napisał(a):
>> 
>> Yes, I see the discussion in the pull request. It definitely is not backward compatible. As in the old simple checkbox template (struts 2.5), you always generate the hidden input field. In struts 6 you added <#if parameters.submitUnchecked!false>, so the hidden field is only generate if you set the attribute in the tag.
> 
> You are right, previously the hidden input was always there, but I
> missed that :\ Feel free to open a ticket in JIRA and we will revert
> to the previous behaviour
> 
> 
> Regards
> -- 
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


Re: From ??? Re: From ??? Re: Checkbox tag new attribute submitUnchecked

Posted by Lukasz Lenart <lu...@apache.org>.
śr., 9 lis 2022 o 14:59 Britta Katzenbach <ka...@liwa.de> napisał(a):
>
> Yes, I see the discussion in the pull request. It definitely is not backward compatible. As in the old simple checkbox template (struts 2.5), you always generate the hidden input field. In struts 6 you added <#if parameters.submitUnchecked!false>, so the hidden field is only generate if you set the attribute in the tag.

You are right, previously the hidden input was always there, but I
missed that :\ Feel free to open a ticket in JIRA and we will revert
to the previous behaviour


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


Re: From ??? Re: From ??? Re: Checkbox tag new attribute submitUnchecked

Posted by Britta Katzenbach <ka...@liwa.de>.
Yes, I see the discussion in the pull request. It definitely is not backward compatible. As in the old simple checkbox template (struts 2.5), you always generate the hidden input field. In struts 6 you added <#if parameters.submitUnchecked!false>, so the hidden field is only generate if you set the attribute in the tag.

Best regards,

Britta

Britta Katzenbach

_____________________________________________________
e-Mail: katzenbach@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


> Am 09.11.2022 um 14:21 schrieb Burton Rhodes <bu...@gmail.com>:
> 
> Sure thing. When this feature was implemented, I remember making sure we didn't break backward compatibility.  Strange that you are seeing this "break" during your upgrade.  Perhaps Lukasz can chime in.
> 
> Pull Request for SubmitUnchecked
> https://github.com/apache/struts/pull/169
> 
> 
> ------ Original Message ------
> From "Britta Katzenbach" <ka...@liwa.de>
> To "Struts Users Mailing List" <us...@struts.apache.org>
> Date 11/9/2022 7:10:54 AM
> Subject Re: From ??? Re: Checkbox tag new attribute submitUnchecked
> 
>> Hi Burton,
>> 
>> Thanks for the quick answer and the description! I was hoping for a solution to set the default value via the configuration, but it is ok. We prefer to set the attribute in all our checkboxes in this case, because otherwise we would need to maintain the template.
>> 
>> It would be nice if there is a short remark in the migration guide, that the attribute is added and its default value. Otherwise it is kind of hard to notice that the application is behaving differently.
>> 
>> Kind regards,
>> 
>> Britta
>> 
>> Britta Katzenbach
>> 
>> _____________________________________________________
>> e-Mail: katzenbach@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
>> 
>> 
>>> Am 09.11.2022 um 12:25 schrieb Burton Rhodes <bu...@gmail.com>:
>>> 
>>> 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" <ka...@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: katzenbach@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
>>>>