You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2014/03/27 15:01:35 UTC
[jira] [Updated] (WW-4313) freemaker Checkboxlist not rendering id
correctly
[ https://issues.apache.org/jira/browse/WW-4313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-4313:
------------------------------
Description:
The existing code:
{code:xml}
<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"
id="${parameters.name?html}-${itemCount}"<#rt/>
{code}
needs to check for the id before adding the name ie:
{code:xml}
<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"<#rt/>
<#if parameters.id??>
id="${parameters.id?html}-${itemCount}"<#rt/>
<#else>
id="${parameters.name?html}-${itemCount}"<#rt/>
</#if>
{code}
Also the label needs the mods also:
from:
{code:xml}
<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
{code}
to:
{code:xml}
<label<#rt/>
<#if parameters.id??>
for="${parameters.id?html}-${itemCount}"<#rt/>
<#else>
for="${parameters.name?html}-${itemCount}"<#rt/>
</#if>
class="checkboxLabel">${itemValue?html}</label>
{code}
was:
The existing code:
<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"
id="${parameters.name?html}-${itemCount}"<#rt/>
needs to check for the id before adding the name ie:
<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"<#rt/>
<#if parameters.id??>
id="${parameters.id?html}-${itemCount}"<#rt/>
<#else>
id="${parameters.name?html}-${itemCount}"<#rt/>
</#if>
Also the label needs the mods also:
from:
<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
to:
<label<#rt/>
<#if parameters.id??>
for="${parameters.id?html}-${itemCount}"<#rt/>
<#else>
for="${parameters.name?html}-${itemCount}"<#rt/>
</#if>
class="checkboxLabel">${itemValue?html}</label>
> freemaker Checkboxlist not rendering id correctly
> -------------------------------------------------
>
> Key: WW-4313
> URL: https://issues.apache.org/jira/browse/WW-4313
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions
> Affects Versions: 2.3.16.1
> Environment: Tomcat/centos
> Reporter: Greg Huber
> Assignee: Greg Huber
> Priority: Minor
>
> The existing code:
> {code:xml}
> <input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"
> id="${parameters.name?html}-${itemCount}"<#rt/>
> {code}
> needs to check for the id before adding the name ie:
> {code:xml}
> <input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}"<#rt/>
> <#if parameters.id??>
> id="${parameters.id?html}-${itemCount}"<#rt/>
> <#else>
> id="${parameters.name?html}-${itemCount}"<#rt/>
> </#if>
> {code}
> Also the label needs the mods also:
> from:
> {code:xml}
> <label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
> {code}
> to:
> {code:xml}
> <label<#rt/>
> <#if parameters.id??>
> for="${parameters.id?html}-${itemCount}"<#rt/>
> <#else>
> for="${parameters.name?html}-${itemCount}"<#rt/>
> </#if>
> class="checkboxLabel">${itemValue?html}</label>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)