myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathias Werlitz (JIRA)" <>
Subject [jira] Created: (TOMAHAWK-1429) t:checkbox not checked correctly after validation error
Date Mon, 15 Jun 2009 16:24:07 GMT
t:checkbox not checked correctly after validation error

                 Key: TOMAHAWK-1429
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.8
         Environment: Sun RI, JSF 1.2
            Reporter: Mathias Werlitz

If you use t:selectManyCheckbox with layout="spread" and t:checkbox the selection of the checkboxes
after an validation error is incorrect. When using layout="pageDirection" it is correct.

When using layout="spread" and t:checkbox HtmlCheckboxRenderer renders the last successfully
validated component values (intenally stored HtmlSelectManyCheckbox.value) checked after an
validation error. This is not correct. It should render the checkboxes as submitted like HtmlCheckboxRenderer
does when t:selectManyCheckbox is used with layout="pageDirection".

The method renderSingleCheckbox() of org.apache.myfaces.renderkit.html.ext.HtmlCheckboxRenderer
should lookup the valueSet like in renderCheckboxListVertically() and determine the checked
boolean more like renderGroupOrItemCheckbox().


<t:selectManyCheckbox id="test" required="true" value="#{value}"  layout="spread" >
	<t:selectItems ...../>

<t:checkbox for="test" index="0" />
<t:checkbox for="test" index="1" />
<t:checkbox for="test" index="2" />

<h:inputText required="true" />

1. you select checkbox one and submit the form -> validation error for inputText
2. you deselect checkbox one and submit the form -> validation error for selectManyCheckbox
 and inputText BUT
    checkbox one is checked although it was submited not checked

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message