You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/12/09 11:34:34 UTC

DO NOT REPLY [Bug 15044] - Taglib - Index Attribute in html:Checkbox doesn't set correctly

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=15044>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=15044


holbitlan@gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From holbitlan@gmx.de  2004-12-09 11:34 -------
I have the same problem as Derek!

I know that the setter is always called with parameter true (i.e. only for
checkboxes that are checked). But the appropriate setter is NEVER called -
neither for checked nor for unchecked checkboxes. 

The getter is called as expected.

Here is my code:

// JSP
<logic:iterate id="element" name="projectForm"
property="certificates.statutoryItems">
	<tr>
		<td align='right' class='fd'><bean:write name="element" property="id"/></td>
		<td class='fd'><bean:write name="element" property="description"/></td>
		<td class='fd'><html:checkbox indexed="true" name="element"
property="selected"></html:checkbox></td>
	</tr>
</logic:iterate>


// FORM
public CertificateItem[] getStatutoryItems()
{
    return statutoryItems;
}

public void setStatutoryItems( CertificateItem[] statutoryItems )
{
    this.statutoryItems = statutoryItems;
}


// ITEM
public boolean isSelected()
{
    return selected;
}

public void setSelected( boolean selected )
{
    this.selected = selected;
}

And yes: I'm using the overloaded reset method with setSelected(false).


The strange thing is, that the following code works:
<logic:iterate id="element" name="projectForm"
property="certificates.statutoryItems">
	<tr>
		<td align='right' class='fd'><bean:write name="element" property="id"/></td>
		<td class='fd'><bean:write name="element" property="description"/></td>
		<td class='fd'><html:checkbox indexed="true" name="element"
property="selected"></html:checkbox></td>
	</tr>
</logic:iterate>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org