[
http://jira.codehaus.org/browse/DISPL-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201561#action_201561
]
Ealden EscaƱan commented on DISPL-596:
--------------------------------------
Also encountered this problem and I came up with the same fix.
> In CheckboxTableDecorator, when changing default name is not working properly
> -----------------------------------------------------------------------------
>
> Key: DISPL-596
> URL: http://jira.codehaus.org/browse/DISPL-596
> Project: DisplayTag
> Issue Type: Bug
> Reporter: Alvaro Villarroel
>
> when using CHECKBOXES and if we change the deaulf value for Name "_chk" to
> another name let say "myName" is not working properly. this maybe due to this
> method:
> public String getCheckbox()
> {
> String evaluatedId = ObjectUtils.toString(evaluate(id));
> boolean checked = checkedIds.contains(evaluatedId);
> StringBuffer buffer = new StringBuffer();
> buffer.append("<input type=\"checkbox\" name=\"_chk\" value=\"");
> <----------------------------- THIS LINE IS CAUSING THE BUG
> buffer.append(evaluatedId);
> buffer.append("\"");
> if (checked)
> {
> checkedIds.remove(evaluatedId);
> buffer.append(" checked=\"checked\"");
> }
> buffer.append("/>");
> return buffer.toString();
> }
> A possible solution may be to change line :
> -------------> buffer.append("<input type=\"checkbox\" name=\"_chk\"
> value=\"");
> For
> buffer.append("<input type=\"checkbox\" ");
> buffer.append(" name=\"");
> buffer.append(fieldName);
> buffer.append("\" value=\"");
> buffer.append(evaluatedId); .........
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
displaytag-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel