[ 
https://issues.apache.org/jira/browse/WW-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490871#comment-17490871
 ] 

Greg Huber commented on WW-5168:
--------------------------------

if I compare ftl with javatemplates, seems to me the CheckboxHandler check 
needs to be the other way around.


The default is to hide the hidden attribute, so submitUnchecked=false, but on 
the javatemplates it shows because it is:
{code:java}
if (!submitUnchecked) {
   //hidden input
   attrs = new Attributes();
   attrs.add("type", "hidden")....
}
{code}
 

...We now have to say we want the hidden:
<s:checkbox name="myCheckbox" value="myCHeckbox" *submitUnchecked="true"* />

So the CheckboxHandler check needs:
{code:java}
if (submitUnchecked) {
   //hidden input
   attrs = new Attributes();
   attrs.add("type", "hidden")....
}
{code}
If I switch between them now they both match.

> Fix missing submitUnchecked and broken disabled attributes in Javatemplates 
> checkbox tag
> ----------------------------------------------------------------------------------------
>
>                 Key: WW-5168
>                 URL: https://issues.apache.org/jira/browse/WW-5168
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Java Templates
>    Affects Versions: 2.5.29
>            Reporter: Greg Huber
>            Priority: Minor
>             Fix For: 2.6
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add missing attribute submitUnchecked to java templates checkbox tag so it 
> matches the main freemarker template.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to