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

        

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to