Disabled attribute on checkbox should also disable the automatically created
hidden formfield
---------------------------------------------------------------------------------------------
Key: WW-2617
URL: https://issues.apache.org/struts/browse/WW-2617
Project: Struts 2
Issue Type: Bug
Affects Versions: 2.0.11.1
Reporter: Jelmer Kuperus
Disabling a html form element will cause its value not to be posted.
when you disable a checkbox using <s:checkbox name="somename" disable="true"/>
the value is still submitted because the hidden formfield that is created is
not disabled.
The quick fix would be to change
<input type="hidden" name="__checkbox_${parameters.name?html}"
value="${parameters.fieldValue?html}" />
in checkbox.ftl to:
<input type="hidden" name="__checkbox_${parameters.name?html}"
value="${parameters.fieldValue?html}"
<#if parameters.disabled?default(false)>
disabled="disabled"<#rt/>
</#if>
/>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.